CASSANDRA-19569: Fix currentlyOpenedEarlyAt not updating in offline SSTableRewriter - #5140
Open
cheeeee wants to merge 1 commit into
Open
CASSANDRA-19569: Fix currentlyOpenedEarlyAt not updating in offline SSTableRewriter#5140cheeeee wants to merge 1 commit into
cheeeee wants to merge 1 commit into
Conversation
…ASSANDRA-19569) In SSTableRewriter.maybeReopenEarly(DecoratedKey key), the offline branch (transaction.isOffline()) invoked reader.trySkipFileCacheBefore(key) for each original reader when writer.getFilePointer() - currentlyOpenedEarlyAt > preemptiveOpenInterval, but failed to update currentlyOpenedEarlyAt = writer.getFilePointer(). As a result, once the written data exceeded the 50MB preemptiveOpenInterval, the condition remained permanently true for every subsequent row, calling trySkipFileCacheBefore() on every single partition for the rest of the file. This caused a massive storm of open(), fadvise64(POSIX_FADV_DONTNEED), and close() system calls, degrading sstableupgrade and offline rewrite throughput to < 0.5 MB/s on fast storage. Added discriminating regression test testOfflinePreemptiveIntervalAdvancesPosition in SSTableRewriterTest verifying position advance and clean execution. Fixes: CASSANDRA-19569
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; previous performance and runtime-verification claims are not established by the available evidence.
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:
db95802f011b1604310bdf4edb073493828056c9.