Files
scylladb/replica
Raphael S. Carvalho 893ee68251 replica: Clean up storage of tablet on migration
When a tablet is migrated into a new home, we need to clean its
storage (i.e. the compaction group) in the old home.
This includes its presence in row cache, which can be shared by
multiple tablets living in the same shard.

For exception safety, the following is done first in a "prepare
phase" during cache invalidation.

1) take a compaction guard, to stop and disable compaction
2) flush memtable(s).
3) builds a list of all sstables, which represents all the
storage of the tablet.

Then once cache is invalidated successfully, we then clear
the sstable sets of the the group in the "execution phase",
to prevent any background op from incorrectly picking them
and also to allow for their deletion.

All the sstables of a tablet are deleted atomically, in order
to guarantee that a failure midway won't cause data resurrection
if it happens tablet is migrated back into the old home.

Signed-off-by: Raphael S. Carvalho <raphaelsc@scylladb.com>
2023-10-04 12:16:19 -03:00
..
2023-07-19 01:28:28 -04:00
2023-02-15 11:01:50 +02:00
2023-07-19 01:28:28 -04:00
2023-05-12 07:26:18 -04:00