-
Notifications
You must be signed in to change notification settings - Fork 218
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
For Cassandra storage minimise the number of tombstones (NULL entries) in the repair_run table #244
For Cassandra storage minimise the number of tombstones (NULL entries) in the repair_run table #244
Conversation
The changes in CassandraStorage form the crux of the patch. |
b793304
to
f58665a
Compare
…) in the repair_run table. Remove RepairSegment.repairCommandId as no one was using/storing it. Make explicit which fields in RepairSegment can be null and be nulled. Hide the RepairSegment.Builder constructor. Add Preconditions and asserts in ensuring lifecycle state is correct and null fields only exist as/when appropriate. Preconditions are used when fast and providing fail-fast design. Asserts are used where expensive and/or are secondary checks. ref: - #240 - #244
f58665a
to
6322293
Compare
…) in the repair_run table. Remove RepairSegment.repairCommandId as no one was using/storing it. Make explicit which fields in RepairSegment can be null and be nulled. Hide the RepairSegment.Builder constructor. Add Preconditions and asserts in ensuring lifecycle state is correct and null fields only exist as/when appropriate. Preconditions are used when fast and providing fail-fast design. Asserts are used where expensive and/or are secondary checks. ref: - #240 - #244
the joy of codebases that don't treat nulls explicitly… :-/ |
6322293
to
091403b
Compare
…) in the repair_run table. Remove RepairSegment.repairCommandId as no one was using/storing it. Make explicit which fields in RepairSegment can be null and be nulled. Hide the RepairSegment.Builder constructor. Add Preconditions and asserts in ensuring lifecycle state is correct and null fields only exist as/when appropriate. Preconditions are used when fast and providing fail-fast design. Asserts are used where expensive and/or are secondary checks. ref: - #240 - #244
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and approved.
We're not generating tombstones anymore here (or at least very few when nulling the coordinator for example).
091403b
to
dec813f
Compare
…) in the repair_run table. Remove RepairSegment.repairCommandId as no one was using/storing it. Make explicit which fields in RepairSegment can be null and be nulled. Hide the RepairSegment.Builder constructor. Add Preconditions and asserts in ensuring lifecycle state is correct and null fields only exist as/when appropriate. Preconditions are used when fast and providing fail-fast design. Asserts are used where expensive and/or are secondary checks. ref: - #240 - #244
Last change most probably fixed the issue with the race condition between the JMX success notification and the abort of leaderless segments. Let's go ahead and merge. |
…) in the repair_run table. Remove RepairSegment.repairCommandId as no one was using/storing it. Make explicit which fields in RepairSegment can be null and be nulled. Hide the RepairSegment.Builder constructor. Re-read segments once leader-election is done, ensuring we're not writing back stale data Add Preconditions and asserts in ensuring lifecycle state is correct and null fields only exist as/when appropriate. Preconditions are used when fast and providing fail-fast design. Asserts are used where expensive and/or are secondary checks. ref: - #240 - #244
dec813f
to
03b6663
Compare
Remove RepairSegment.repairCommandId as no one was using/storing it.
Make explicit which fields in RepairSegment can be null and be nulled.
Hide the RepairSegment.Builder constructor.
Add Preconditions and asserts in ensuring lifecycle state is correct and null fields only exist as/when appropriate.
Preconditions are used when checks are fast and for providing fail-fast design. Asserts are used where checks are expensive and/or are secondary checks.
ref: #240