Skip to content

Propagate trickle_fsync settings to compressed SSTable writers - #4995

Closed
samueldlightfoot wants to merge 1 commit into
apache:trunkfrom
samueldlightfoot:trunk-fix-21487
Closed

Propagate trickle_fsync settings to compressed SSTable writers#4995
samueldlightfoot wants to merge 1 commit into
apache:trunkfrom
samueldlightfoot:trunk-fix-21487

Conversation

@samueldlightfoot

Copy link
Copy Markdown
Contributor

CompressedSequentialWriter rebuilt its SequentialWriterOption but copied only bufferSize/bufferType/finishOnClose, dropping trickleFsync and trickleFsyncByteInterval. Compression is the default, so trickle_fsync had no effect on SSTable data files: SequentialWriter.doFlush never reached the interval sync. Carry the two fields through the rebuild.

Document in cassandra.yaml that trickle_fsync_interval is counted in uncompressed bytes, so a compressed SSTable syncs after fewer bytes than that reach the disk.

Add tests asserting the full option-rebuild contract (caller knobs pass through, buffer sizing follows the compression layout) and that the interval sync fires while writing compressed data but stays silent when trickle_fsync is off.

Thanks for sending a pull request! Here are some tips if you're new here:

  • Ensure you have added or run the appropriate tests for your PR.
  • Be sure to keep the PR description updated to reflect all changes.
  • Write your PR title to summarize what this PR proposes.
  • If possible, provide a concise example to reproduce the issue for a faster review.
  • Read our contributor guidelines
  • If you're making a documentation change, see our guide to documentation contribution

Commit messages should follow the following format:

<One sentence description, usually Jira title or CHANGES.txt summary>

<Optional lengthier description (context on patch)>

patch by <Authors>; reviewed by <Reviewers> for CASSANDRA-#####

Co-authored-by: Name1 <email1>
Co-authored-by: Name2 <email2>

The Cassandra Jira

CompressedSequentialWriter rebuilt its SequentialWriterOption but copied only
bufferSize/bufferType/finishOnClose, dropping trickleFsync and
trickleFsyncByteInterval. Compression is the default, so trickle_fsync had no
effect on SSTable data files: SequentialWriter.doFlush never reached the
interval sync. Carry the two fields through the rebuild.

Document in cassandra.yaml that trickle_fsync_interval is counted in
uncompressed bytes, so a compressed SSTable syncs after fewer bytes than that
reach the disk.

Add tests asserting the full option-rebuild contract (caller knobs pass
through, buffer sizing follows the compression layout) and that the interval
sync fires while writing compressed data but stays silent when trickle_fsync
is off.
@smiklosovic smiklosovic closed this Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants