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

SynThread checkpoint occurs IllegalReferenceCountException when change entryLogPerLedgerEnabled property #3953

Open
ytong01 opened this issue May 11, 2023 · 0 comments
Labels

Comments

@ytong01
Copy link

ytong01 commented May 11, 2023

BUG REPORT

We have a bookie node which having run a period of time, and it runs with entryLogPerLedgerEnabled is false as default, Recently we change this property to true, unfortunately the program occurs exception as below

image

Steps to reproduce the behavior:

  1. Startup a new bookie node, and the related properties as below:
    ledgerStorageClass=org.apache.bookkeeper.bookie.SortedLedgerStorage
    entryLogPerLedgerEnabled=false
  2. Running this bookie after some time, change entryLogPerLedgerEnabled is true, reboot the bookie node.
  3. The program throw IllegalReferenceCountException
  4. System.exit(5)

Expected behavior

The bookie support switch entrylogPerLedgerEnabled normally.

Additional context

We review the code and find the Entrylogger#flush method will be triggered when GarbageCollectorThread doing compact entrylogs, which will make race condition with syncthread#checkpoint at flushRotatedLogs point, However, the flushRotatedLogs method in EntryLogManagerForEntryLogPerLedger is not protected by synchonzied,hence BufferedLogChannel#close throw IllegalReferenceCountException since a concurrency scenario.

Bookkeeper version : 4.15.0

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

No branches or pull requests

1 participant