mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-23 08:12:08 +00:00
This method requires callers to remember that the sstable is the collection of files on a filesystem and to know what exact directory they are all in. That's not going to work for object storage, instead, sstable should be moved between more abstract states. This PR replaces move_to_new_dir() call with the change_state() one that accepts target sub-directory string and moves files around. Currently supported state changes: * staging -> normal * upload -> normal | staging * any -> quarantine All are pretty straightforward and move files between table basedir subdirectories with the exception that upload -> quarantine should move into upload/quarantine subdirectory. Another thing to keep in mind, that normal state doesn't have its subdir but maps directory to table's base directory. Closes #12648 * github.com:scylladb/scylladb: sstable: Remove explicit quarantization call test: Move move_to_new_dir() method from sstable class sstable, dist.-loader: Introduce and use pick_up_from_upload() method sstables, code: Introduce and use change_state() call distributed_loader: Let make_sstables_available choose target directory