CASSANDRA-21609: Guarantee postFlush latch decrement on flush failure - #5150
Closed
cheeeee wants to merge 1 commit into
Closed
CASSANDRA-21609: Guarantee postFlush latch decrement on flush failure#5150cheeeee wants to merge 1 commit into
cheeeee wants to merge 1 commit into
Conversation
In ColumnFamilyStore.Flush.run(), when a memtable flush failed, the catch block invoked JVMStabilityInspector.inspectThrowable(t) before assigning postFlush.flushFailure and before decrementing postFlush.latch. If inspectThrowable() threw an exception (e.g. OutOfMemoryError, disk full ENOSPC error, or security exception), execution aborted before reaching postFlush.latch.decrement(). Because callers of forceBlockingFlush() and other flush synchronization points wait on postFlush.latch, all waiting threads were stranded indefinitely in WAITING state, causing an unrecoverable node hang. This patch: 1. Records postFlush.flushFailure = t before inspecting the throwable. 2. Moves postFlush.latch.decrement() into a finally block, ensuring that waiting threads are guaranteed to be unblocked regardless of any exception thrown during failure inspection. Fixes: CASSANDRA-21609
Author
|
Closing: CASSANDRA-21609 is assigned to its reporter and has a patch available. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Status: changes requested — not ready to merge
Source review found no introduced production defect. The finally-block fix still needs a clean failure-injection test; it does not cover setup failures before the try block.
Verification correction
Earlier descriptions overstated correctness and/or test coverage. Those claims are withdrawn. AI-assisted source review has been performed; this is not maintainer approval. Previously mixed build artifacts are not accepted as verification evidence. Corrective changes and clean, targeted verification are in progress; the published head has not yet been replaced.
Published head under review:
c70f180c8d1e59b561c36a00219c0c46b6d6c23e.