mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-29 20:57:00 +00:00
Off-strategy can happen in parallel to view building. A semaphore is used to ensure they don't step on each other's toe. If off-strategy completes first, then move_sstables_from_staging() won't find the SSTable alive and won't reach code to add the file to the backlog tracker. If view building completes first, the SSTable exists, but it's not reshaped yet (has repair origin) and shouldn't be added to the backlog tracker. Off-strategy completion code will make sure new sstables added to main set are accounted by the backlog tracker, so move_sstables_from_staging() only need to add to tracker files which are certainly not going through a reshape compaction. So let's take these facts into account to make the procedure more robust and compaction group friendly. Very welcome change for when multiple groups are supported. Signed-off-by: Raphael S. Carvalho <raphaelsc@scylladb.com>