yangxianjungree opened a new pull request, #4860:
URL: https://github.com/apache/bookkeeper/pull/4860

   Descriptions of the changes in this PR:
   
   This PR changes entry log write/flush failure handling so the bookie fails 
closed when the entry-log write path becomes uncertain. The fix is targeted at 
`branch-4.16`, where the issue was reproduced against the 4.16.7 line.
   
   ### Motivation
   
   Entry-log write, flush, rotation, or allocation failures can leave the 
bookie in an uncertain state. Continuing to serve after those failures risks 
silent corruption or inconsistent recovery.
   
   ### Changes
   
   - Introduce `EntryLogWriteException` as the fatal boundary for 
entry-log-level failures.
   - Poison `BufferedChannel` after partial flush or force-write failures so 
later writes cannot continue on an uncertain file position.
   - Make `DefaultEntryLogger`, `SyncThread`, `BookieImpl`, `DbLedgerStorage`, 
`SingleDirectoryDbLedgerStorage`, and `SortedLedgerStorage` fail closed on 
entry-log write/flush failures.
   - Keep `NoWritableLedgerDirException` behavior unchanged.
   - Add unit coverage and a real BookKeeper client e2e that reproduces the 
flush-failure path and verifies client-visible failure plus bookie shutdown.
   
   Master Issue: #4855
   
   Tests:
   - `mvn -pl bookkeeper-server -am 
-Dtest=DbLedgerStorageEntryLogFlushFailureE2ETest 
-Dsurefire.failIfNoSpecifiedTests=false test`
   - `mvn -pl bookkeeper-server -am 
-Dtest=DbLedgerStorageEntryLogFlushFailureE2ETest,BookieImplTest,SyncThreadTest,DbLedgerStorageWriteCacheTest
 -Dsurefire.failIfNoSpecifiedTests=false test`
   


-- 
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