Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] SingleDirectoryDbLedgerStorage#flushMutex does not release lock on all exception paths #3908

Closed
StevenLuMT opened this issue Apr 7, 2023 · 0 comments · Fixed by #3909
Assignees
Labels

Comments

@StevenLuMT
Copy link
Contributor

StevenLuMT commented Apr 7, 2023

BUG REPORT

Describe the bug

Because this pr(#3772) was merged,SingleDirectoryDbLedgerStorage#flushMutex does not release lock on all exception paths

To Reproduce

Steps to reproduce the behavior:

  1. When another pr [feature] [server] add dbStorage_readAheadCacheBatchBytesSize properties when read ahead entries #3895 went to modify SingleDirectoryDbLedgerStorage.java, the checkstyle workflow run failed for
    Error: Medium: org.apache.bookkeeper.bookie.storage.ldb.SingleDirectoryDbLedgerStorage.checkpoint(CheckpointSource$Checkpoint) does not release lock on all exception paths [org.apache.bookkeeper.bookie.storage.ldb.SingleDirectoryDbLedgerStorage] At SingleDirectoryDbLedgerStorage.java:[line 791] UL_UNRELEASED_LOCK_EXCEPTION_PATH

Expected behavior
the checkstyle workflow run successfully

Screenshots

image

Additional context
old code:
image

in #3772 updated
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant