ytong01 opened a new issue, #3953:
URL: https://github.com/apache/bookkeeper/issues/3953

   **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
   
   <img width="911" alt="image" 
src="https://github.com/apache/bookkeeper/assets/32755366/a623d0b5-ad18-48a6-84c2-bba36a2ee3ac";>
   
   
   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
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to