Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persist isCompacted status of SSTables and scrub on startup #521

Merged
merged 12 commits into from
Aug 20, 2024

Conversation

wi11dey
Copy link
Contributor

@wi11dey wi11dey commented Aug 16, 2024

When a table finished compaction as it is being streamed, the streaming will still hold a ref on the compaction ancestor. If the node crashes in this state, the next reboot will read both the ancestor and the compacted SSTable without any tombstones that arrived and got compacted during streaming.

@wi11dey wi11dey force-pushed the wdey/scrub-compacted-marker branch from 3291113 to f415b6f Compare August 16, 2024 05:41
@wi11dey wi11dey force-pushed the wdey/scrub-compacted-marker branch from 5f5ae1e to 4458362 Compare August 16, 2024 07:56
@wi11dey wi11dey force-pushed the wdey/scrub-compacted-marker branch from f4b14d7 to 0c460ba Compare August 16, 2024 21:53
@@ -1691,7 +1691,7 @@ public boolean markObsolete(Tracker tracker)
{
assert !tidy.isReplaced;
}
if (!tidy.global.isCompacted.getAndSet(true))
if (!tidy.global.setCompacted())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note during review:

  • this is the only place in the code isCompacted was getting set to true
  • setCompacted is synchronized

thus the former atomic call to getAndSet is still mirrored in this change

@wi11dey wi11dey merged commit 51522bd into palantir-cassandra-2.2.18 Aug 20, 2024
6 checks passed
rhuffy added a commit that referenced this pull request Aug 22, 2024
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.

3 participants