mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-25 01:02:20 +00:00
mark_for_deletion() only set an in-memory flag; the actual file deletion ran lazily when the last shared_sstable reference dropped, leaving a window in which a follow-up scan of the upload directory (e.g. a second 'nodetool refresh --load-and-stream') could observe a partially-deleted sstable and fail with malformed_sstable_exception. Force the unlink to complete before stream() returns. For tablet streaming, partially-contained sstables span multiple per-tablet batches, so a defer_unlinking flag postpones the unlink until after all sstables are streamed; for vnodes and fully-contained sstables are streamed only once and could be removed just after being streamed. Added a FIXME on object_storage_base::wipe and strengthened the doc on storage::wipe to make the never-fails contract explicit
5.8 KiB
5.8 KiB