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
Offstrategy compaction must piggyback cleanup on reshape when invoked from the cleanup path #15041
Comments
What's the priority/severity of this? |
The severity is high since this may cause data resurrection. |
I'm also improving the |
… from compaction_state perform_offstrategy is called from try_perform_cleanup when there are sstables in the maintenance set that require cleanup. In this case the compaction_state.owned_ranges_ptr is set, but run_offstrategy_compaction currently ignores that and doesn't piggyback cleanup on reshape, which it must. Fixes scylladb#15041 Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
… from compaction_state perform_offstrategy is called from try_perform_cleanup when there are sstables in the maintenance set that require cleanup. The input sstables are inserted into the compaction_state `sstables_requiring_cleanup` and `try_perform_cleanup` expects offstrategy compaction to clean them up along with reshape compaction. Otherwise, the maintenance sstables that require cleanup are not cleaned up by cleanup compaction, since the reshape output sstable(s) are not analyzed again after reshape compaction, where that would insert the output sstable(s) into `sstables_requiring_cleanup` and trigger their cleanup in the subsequent cleanup compaction. The latter method is viable too, but it is less effficient since we can do reshape+cleanup in one pass, vs. reshape first and cleanup later. Fixes scylladb#15041 Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
… from compaction_state perform_offstrategy is called from try_perform_cleanup when there are sstables in the maintenance set that require cleanup. The input sstables are inserted into the compaction_state `sstables_requiring_cleanup` and `try_perform_cleanup` expects offstrategy compaction to clean them up along with reshape compaction. Otherwise, the maintenance sstables that require cleanup are not cleaned up by cleanup compaction, since the reshape output sstable(s) are not analyzed again after reshape compaction, where that would insert the output sstable(s) into `sstables_requiring_cleanup` and trigger their cleanup in the subsequent cleanup compaction. The latter method is viable too, but it is less effficient since we can do reshape+cleanup in one pass, vs. reshape first and cleanup later. Fixes scylladb#15041 Signed-off-by: Benny Halevy <bhalevy@scylladb.com> Closes scylladb#15043
Adding |
… from compaction_state perform_offstrategy is called from try_perform_cleanup when there are sstables in the maintenance set that require cleanup. The input sstables are inserted into the compaction_state `sstables_requiring_cleanup` and `try_perform_cleanup` expects offstrategy compaction to clean them up along with reshape compaction. Otherwise, the maintenance sstables that require cleanup are not cleaned up by cleanup compaction, since the reshape output sstable(s) are not analyzed again after reshape compaction, where that would insert the output sstable(s) into `sstables_requiring_cleanup` and trigger their cleanup in the subsequent cleanup compaction. The latter method is viable too, but it is less effficient since we can do reshape+cleanup in one pass, vs. reshape first and cleanup later. \Fixes scylladb#15041 Signed-off-by: Benny Halevy <bhalevy@scylladb.com> \Closes scylladb#15043 (cherry picked from commit 9f77a32)
… from compaction_state perform_offstrategy is called from try_perform_cleanup when there are sstables in the maintenance set that require cleanup. The input sstables are inserted into the compaction_state `sstables_requiring_cleanup` and `try_perform_cleanup` expects offstrategy compaction to clean them up along with reshape compaction. Otherwise, the maintenance sstables that require cleanup are not cleaned up by cleanup compaction, since the reshape output sstable(s) are not analyzed again after reshape compaction, where that would insert the output sstable(s) into `sstables_requiring_cleanup` and trigger their cleanup in the subsequent cleanup compaction. The latter method is viable too, but it is less effficient since we can do reshape+cleanup in one pass, vs. reshape first and cleanup later. \Fixes scylladb#15041 Signed-off-by: Benny Halevy <bhalevy@scylladb.com> \Closes scylladb#15043 (cherry picked from commit 9f77a32)
… from compaction_state perform_offstrategy is called from try_perform_cleanup when there are sstables in the maintenance set that require cleanup. The input sstables are inserted into the compaction_state `sstables_requiring_cleanup` and `try_perform_cleanup` expects offstrategy compaction to clean them up along with reshape compaction. Otherwise, the maintenance sstables that require cleanup are not cleaned up by cleanup compaction, since the reshape output sstable(s) are not analyzed again after reshape compaction, where that would insert the output sstable(s) into `sstables_requiring_cleanup` and trigger their cleanup in the subsequent cleanup compaction. The latter method is viable too, but it is less effficient since we can do reshape+cleanup in one pass, vs. reshape first and cleanup later. \Fixes scylladb#15041 Signed-off-by: Benny Halevy <bhalevy@scylladb.com> \Closes scylladb#15043 (cherry picked from commit 9f77a32)
@bhalevy is this part of the cleanup backport series? If not, please prepare a backport PR agasint 5.2. |
perform_offstrategy is called from try_perform_cleanup
when there are sstables in the maintenance set that require
cleanup.
try_perform_clean first scans both the main and maintenance sets,
looking for sstables that require cleanup, and it calls perform_offstrategy
if any sstable in the maintenance set requires cleanup, and it expects offstrategy,
in this case, to piggyback cleanup on reshape compactio, based on the owned_ranges_ptr
try_perform_clean sets up in the compaction_state.
Currently, offstrategy compaction ignores the owned ranges ptr in compaction_state
and so, no cleanup is done during reshape and the reshape output sstable(s)
will contain disowned tokens, which are not cleaned up, since try_cleanup_compaction
does not scan the reshape output sstable(s). If it would, they would be added to
sstables_requiring_cleanup
, but this is less efficient, since it will require yet anotherpass over the data, while piggybacking cleanup on reshape does that in a single pass.
The text was updated successfully, but these errors were encountered: