Skip to content

Conversation

@wenbingshen
Copy link
Member

Motivation

this introduced in #2842, the ledgerAuditorManager will be close repeatedly.

    private void submitShutdownTask() {
        executor.submit(new Runnable() {
                @Override
                public void run() {
                    if (!running.compareAndSet(true, false)) {
                        return;
                    }

                    try {
                        ledgerAuditorManager.close();   <- here has already closed LAM.
                    } catch (InterruptedException ie) {
                        Thread.currentThread().interrupt();
                        LOG.warn("InterruptedException while closing ledger auditor manager", ie);
                    } catch (Exception ke) {
                        LOG.error("Exception while closing ledger auditor manager", ke);
                    }
                }
            });
    }

@wenbingshen
Copy link
Member Author

ping @hangc0276 PTAL. Thanks.

@wenbingshen
Copy link
Member Author

rerun failure checks

Copy link
Member

@StevenLuMT StevenLuMT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch

@wenbingshen
Copy link
Member Author

also ping @dlg99 @eolivelli @shoothzj

@zymap zymap added the type/bug label Sep 27, 2022
@zymap zymap added this to the 4.16.0 milestone Sep 27, 2022
@StevenLuMT
Copy link
Member

@eolivelli @dlg99
If you have time,help review this pr,thanks

@wenbingshen
Copy link
Member Author

@StevenLuMT @zymap Can this PR be merged? Any more questions, please let me know. Thanks.

@wenbingshen
Copy link
Member Author

@zymap Can this pr be merged now. Thanks.

@zymap zymap merged commit dbec4e9 into apache:master Oct 19, 2022
@wenbingshen wenbingshen deleted the LAM_CloseRepeatedly branch October 19, 2022 06:36
zymap pushed a commit that referenced this pull request Oct 26, 2022
### Motivation
this introduced in #2842, the `ledgerAuditorManager` will be close repeatedly.

```java
    private void submitShutdownTask() {
        executor.submit(new Runnable() {
                @OverRide
                public void run() {
                    if (!running.compareAndSet(true, false)) {
                        return;
                    }

                    try {
                        ledgerAuditorManager.close();   <- here has already closed LAM.
                    } catch (InterruptedException ie) {
                        Thread.currentThread().interrupt();
                        LOG.warn("InterruptedException while closing ledger auditor manager", ie);
                    } catch (Exception ke) {
                        LOG.error("Exception while closing ledger auditor manager", ke);
                    }
                }
            });
    }
```

(cherry picked from commit dbec4e9)
hangc0276 pushed a commit to hangc0276/bookkeeper that referenced this pull request Nov 7, 2022
### Motivation
this introduced in apache#2842, the `ledgerAuditorManager` will be close repeatedly.

```java
    private void submitShutdownTask() {
        executor.submit(new Runnable() {
                @OverRide
                public void run() {
                    if (!running.compareAndSet(true, false)) {
                        return;
                    }

                    try {
                        ledgerAuditorManager.close();   <- here has already closed LAM.
                    } catch (InterruptedException ie) {
                        Thread.currentThread().interrupt();
                        LOG.warn("InterruptedException while closing ledger auditor manager", ie);
                    } catch (Exception ke) {
                        LOG.error("Exception while closing ledger auditor manager", ke);
                    }
                }
            });
    }
```

(cherry picked from commit dbec4e9)
hangc0276 pushed a commit to hangc0276/bookkeeper that referenced this pull request Nov 7, 2022
### Motivation
this introduced in apache#2842, the `ledgerAuditorManager` will be close repeatedly.

```java
    private void submitShutdownTask() {
        executor.submit(new Runnable() {
                @OverRide
                public void run() {
                    if (!running.compareAndSet(true, false)) {
                        return;
                    }

                    try {
                        ledgerAuditorManager.close();   <- here has already closed LAM.
                    } catch (InterruptedException ie) {
                        Thread.currentThread().interrupt();
                        LOG.warn("InterruptedException while closing ledger auditor manager", ie);
                    } catch (Exception ke) {
                        LOG.error("Exception while closing ledger auditor manager", ke);
                    }
                }
            });
    }
```

(cherry picked from commit dbec4e9)
nicoloboschi pushed a commit to datastax/bookkeeper that referenced this pull request Jan 11, 2023
### Motivation
this introduced in apache#2842, the `ledgerAuditorManager` will be close repeatedly.

```java
    private void submitShutdownTask() {
        executor.submit(new Runnable() {
                @OverRide
                public void run() {
                    if (!running.compareAndSet(true, false)) {
                        return;
                    }

                    try {
                        ledgerAuditorManager.close();   <- here has already closed LAM.
                    } catch (InterruptedException ie) {
                        Thread.currentThread().interrupt();
                        LOG.warn("InterruptedException while closing ledger auditor manager", ie);
                    } catch (Exception ke) {
                        LOG.error("Exception while closing ledger auditor manager", ke);
                    }
                }
            });
    }
```

(cherry picked from commit dbec4e9)
(cherry picked from commit 224254b)
Ghatage pushed a commit to sijie/bookkeeper that referenced this pull request Jul 12, 2024
### Motivation
this introduced in apache#2842, the `ledgerAuditorManager` will be close repeatedly.

```java
    private void submitShutdownTask() {
        executor.submit(new Runnable() {
                @OverRide
                public void run() {
                    if (!running.compareAndSet(true, false)) {
                        return;
                    }

                    try {
                        ledgerAuditorManager.close();   <- here has already closed LAM.
                    } catch (InterruptedException ie) {
                        Thread.currentThread().interrupt();
                        LOG.warn("InterruptedException while closing ledger auditor manager", ie);
                    } catch (Exception ke) {
                        LOG.error("Exception while closing ledger auditor manager", ke);
                    }
                }
            });
    }
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants