mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-03 06:35:51 +00:00
When an sstable is prepared to be written on disk the .write_toc() is called on it which created temporary toc file. Prior to this, the writer code calls generate_toc() to collect components on the sstable. This patch adds the .open_sstable() API call that does both. This prepares the write_toc() part to be moved to storage, because it's not just "write data into TOC file", it's the first step in transaction implemeted on top of rename()s. The test need care -- there's rewrite_toc_without_scylla_component() thing in utils that doesn't want the generate_toc() part to be called. It's not patched here and continues calling .write_toc(). Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>