Commit Graph

123 Commits

Author SHA1 Message Date
Benny Halevy
e2023877f2 sstable_directory: parallel_for_each_restricted: do not move container
Commit ecbd112979
`distributed_loader: reshard: consider sstables for cleanup`
caused a regression in loading new sstables using the `upload`
directory, as seen in e.g. https://jenkins.scylladb.com/view/master/job/scylla-master/job/dtest-daily-release/230/testReport/migration_test/TestMigration/Run_Dtest_Parallel_Cloud_Machines___FullDtest___full_split000___test_migrate_sstable_without_compression_3_0_md_/
```
        query = "SELECT COUNT(*) FROM cf"
        statement = SimpleStatement(query)
        s = self.patient_cql_connection(node, 'ks')
        result = list(s.execute(statement))
>       assert result[0].count == expected_number_of_rows, \
            "Expected {} rows. Got {}".format(expected_number_of_rows, list(s.execute("SELECT * FROM ks.cf")))
E       AssertionError: Expected 1 rows. Got []
E       assert 0 == 1
E         +0
E         -1
```

The reason for the regression is that the call to `do_for_each_sstable`
in `collect_all_shared_sstables` to search for sstables that need
cleanup caused the list of sstables in the sstable directory to be
moved and cleared.

parallel_for_each_restricted moves the container passed to it
into a `do_with` continuation.  This is required for
parallel_for_each_restricted.

However, moving the container is destructive and so,
the decision whether to move or not needs to be the
caller's, not the callee.

This patch changes the signature of parallel_for_each_restricted
to accept a lvalue reference to the container rather than a rvalue reference,
allowing the callers to decide whether to move or not.

Most callers are converted to move the container, as they effectively do
today, and a new method, `filter_sstables` was added for the
`collect_all_shared_sstables` us case, that allows the `func` that
processes each sstable to decide whether the sstable is kept
in `_unshared_local_sstables` or not.

Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
2023-05-04 11:36:25 +03:00
Avi Kivity
7b7d9bcb14 Merge 'Do not access owned_ranges_ptr across shards in update_sstable_cleanup_state' from Benny Halevy
This series fixes a few issues caused by f1bbf705f9
(f1bbf705f9):

- table, compaction_manager: prevent cross shard access to owned_ranges_ptr
  - Fixes #13631
- distributed_loader: distribute_reshard_jobs: pick one of the sstable shard owners
- compaction: make_partition_filter: do not assert shard ownership
  - allow the filtering reader now used during resharding to process tokens owned by other shards

Closes #13635

* github.com:scylladb/scylladb:
  compaction: make_partition_filter: do not assert shard ownership
  distributed_loader: distribute_reshard_jobs: pick one of the sstable shard owners
  table, compaction_manager: prevent cross shard access to owned_ranges_ptr
2023-05-01 22:51:00 +03:00
Benny Halevy
c7d064b8b1 distributed_loader: distribute_reshard_jobs: pick one of the sstable shard owners
When distributing the resharding jobs, prefer one of
the sstable shard owners based on foreign_sstable_open_info.

This is particularly important for uploaded sstables
that are resharded since they require cleanup.

Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
2023-04-23 15:13:16 +03:00
Benny Halevy
2f61de8f7b table, compaction_manager: prevent cross shard access to owned_ranges_ptr
Seen after f1bbf705f9 in debug mode

distributed_loader collect_all_shared_sstables copies
compaction::owned_ranges_ptr (lw_shared_ptr<const
dht::token_range_vector>)
across shards.

Since update_sstable_cleanup_state is synchronous, it can
be passed a const refrence to the token_range_vector instead.
It is ok to access the memory read-only across shards
and since this happens on start-up, there are no special
performance requirements.

Fixes #13631

Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
2023-04-23 15:12:13 +03:00
Kefu Chai
576adbdbc5 replica, test: create generation id using generator
reuse generation_generator for generating generation identifiers for
less repeatings. also, add allow update generator to update its
lastest known generation id.

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
2023-04-21 22:02:30 +08:00
Raphael S. Carvalho
fe6df3d270 sstable_loader: Discard SSTable bloom filter on load-and-stream
Load-and-stream reads the entire content from SSTables, therefore it can
afford to discard the bloom filter that might otherwise consume a significant
amount of memory. Bloom filters are only needed by compaction and other
replica::table operations that might want to check the presence of keys
in the SSTable files, like single-partition reads.

It's not uncommon to see Data:Filter ratio of less than 100:1, meaning
that for ~300G of data, filters will take ~3G.

In addition to saving memory footprint, it also reduces operation time
as load-and-stream no longer have to read, parse and build the filters
from disk into memory.

Signed-off-by: Raphael S. Carvalho <raphaelsc@scylladb.com>
2023-04-13 11:34:22 -03:00
Botond Dénes
f1bbf705f9 Merge 'Cleanup sstables in resharding and other compaction types' from Benny Halevy
This series extends sstable cleanup to resharding and other (offstrategy, major, and regular) compaction types so to:
* cleanup uploaded sstables (#11933)
* cleanup staging sstables after they are moved back to the main directory and become eligible for compaction (#9559)

When perform_cleanup is called, all sstables are scanned, and those that require cleanup are marked as such, and are added for tracking to table_state::cleanup_sstable_set.  They are removed from that set once released by compaction.
Along with that sstables set, we keep the owned_ranges_ptr used by cleanup in the table_state to allow other compaction types (offstrategy, major, or regular) to cleanup those sstables that are marked as require_cleanup and that were skipped by cleanup compaction for either being in the maintenance set (requiring offstrategy compaction) or in staging.

Resharding is using a more straightforward mechanism of passing the owned token ranges when resharding uploaded sstables and using it to detect sstable that require cleanup, now done as piggybacked on resharding compaction.

Closes #12422

* github.com:scylladb/scylladb:
  table: discard_sstables: update_sstable_cleanup_state when deleting sstables
  compaction_manager: compact_sstables: retrieve owned ranges if required
  sstables: add a printer for shared_sstable
  compaction_manager: keep owned_ranges_ptr in compaction_state
  compaction_manager: perform_cleanup: keep sstables in compaction_state::sstables_requiring_cleanup
  compaction: refactor compaction_state out of compaction_manager
  compaction: refactor compaction_fwd.hh out of compaction_descriptor.hh
  compaction_manager: compacting_sstable_registration: keep a ref to the compaction_state
  compaction_manager: refactor get_candidates
  compaction_manager: get_candidates: mark as const
  table, compaction_manager: add requires_cleanup
  sstable_set: add for_each_sstable_until
  distributed_loader: reshard: update sstable cleanup state
  table, compaction_manager: add update_sstable_cleanup_state
  compaction_manager: needs_cleanup: delete unused schema param
  compaction_manager: perform_cleanup: disallow empty sorted_owened_ranges
  distributed_loader: reshard: consider sstables for cleanup
  distributed_loader: process_upload_dir: pass owned_ranges_ptr to reshard
  distributed_loader: reshard: add optional owned_ranges_ptr param
  distributed_loader: reshard: get a ref to table_state
  distributed_loader: reshard: capture creator by ref
  distributed_loader: reshard: reserve num_jobs buckets
  compaction: move owned ranges filtering to base class
  compaction: move owned_ranges into descriptor
2023-04-11 14:52:29 +03:00
Benny Halevy
db7fa9f3be distributed_loader: reshard: update sstable cleanup state
Since the sstables are loaded from foreign open info
we should mark them for cleanup if needed (and owned_ranges_ptr is provided).

This will allow a later patch to enable filtering
for cleanup only for sstable sets containing
sstables that require cleanup.

Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
2023-04-10 23:11:00 +03:00
Benny Halevy
d0690b64c1 table, compaction_manager: add update_sstable_cleanup_state
update_sstable_cleanup_state calls needs_cleanup and
inserts (or erases) the sstable into the respective
compaction_state.sstables_requiring_cleanup set.

Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
2023-04-10 23:10:55 +03:00
Benny Halevy
1baca96de1 compaction_manager: needs_cleanup: delete unused schema param
It isn't needed.  The sstable already has a schema.

Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
2023-04-10 23:03:53 +03:00
Benny Halevy
ecbd112979 distributed_loader: reshard: consider sstables for cleanup
When called from `process_upload_dir` we pass a list
of owned tokens to `reshard`.  When they are available,
run resharding, with implicit cleanup, also on unshared
sstables that need cleanup.

Fixes #11933

Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
2023-04-10 23:01:38 +03:00
Benny Halevy
3ccbb28f2a distributed_loader: process_upload_dir: pass owned_ranges_ptr to reshard
To facilitate implicit cleanup of sstables via resharding.

Refs #11933

Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
2023-04-10 22:59:38 +03:00
Benny Halevy
aa4b18f8fb distributed_loader: reshard: add optional owned_ranges_ptr param
For passing owned_ranges_ptr from
distributed_loader::process_upload_dir.

Refs #11933

Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
2023-04-10 22:57:41 +03:00
Benny Halevy
f540af930b distributed_loader: reshard: get a ref to table_state
We don't reference the table itself, only as_table_state.

Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
2023-04-10 22:57:11 +03:00
Benny Halevy
c6b7fcc26f distributed_loader: reshard: capture creator by ref
Now that reshard is a coroutine, creator is preserved
in the coroutine frame until completion so we can
simply capture it by reference now.

Note that previously it was moved into the compaction
descriptor, but the capture wasn't mutable so it was
copied anyhow and this change doesn't introduced a
regression.

Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
2023-04-10 22:56:07 +03:00
Benny Halevy
7c9d16ff96 distributed_loader: reshard: reserve num_jobs buckets
We know in advance how many buckets we need.
We still need to emplace the first bucket upfront.

Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
2023-04-10 22:55:35 +03:00
Pavel Emelyanov
8b9e9671de distributed_loader: Print storage type when populating
On boot it's very useful to know which storage a table comes from, so
add the respective info to existing log messages.

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
2023-04-10 16:44:29 +03:00
Pavel Emelyanov
4bb885b759 sstable: Make storage instance based on storage options
This patch adds storage options lw-ptr to sstables_manager::make_sstable
and makes the storage instance creation depend on the options. For local
it just creates the filesystem storage instance, for S3 -- throws, but
next patch will fix that.

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
2023-04-10 16:43:01 +03:00
Pavel Emelyanov
df026e2cb5 sstable_directory: Keep storage_options aboard
The class in question will need to know the table's storage it will need
to list sstables from. For that -- construct it with the storage options
taken from table.

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
2023-04-10 16:43:01 +03:00
Botond Dénes
207dcbb8fa Merge 'sstables: prepare for uuid-based generation_type' from Benny Halevy
Preparing for #10459, this series defines sstables::generation_type::int_t
as `int64_t` at the moment and use that instead of naked `int64_t` variables
so it can be changed in the future to hold e.g. a `std::variant<int64_t, sstables::generation_id>`.

sstables::new_generation was defined to generation new, unique generations.
Currently it is based on incrementing a counter, but it can be extended in the future
to manufacture UUIDs.

The unit tests are cleaned up in this series to minimize their dependency on numeric generations.
Basically, they should be used for loading sstables with hard coded generation numbers stored under `test/resource/sstables`.

For all the rest, the tests should use existing and mechanisms introduced in this series such as generation_factory, sst_factory and smart make_sstable methods in sstable_test_env and table_for_tests to generate new sstables with a unique generation, and use the abstract sst->generation() method to get their generation if needed, without resorting the the actual value it may hold.

Closes #12994

* github.com:scylladb/scylladb:
  everywhere: use sstables::generation_type
  test: sstable_test_env: use make_new_generation
  sstable_directory::components_lister::process: fixup indentation
  sstables: make highest_generation_seen return optional generation
  replica: table: add make_new_generation function
  replica: table: move sstable generation related functions out of line
  test: sstables: use generation_type::int_t
  sstables: generation_type: define int_t
2023-03-30 17:05:07 +03:00
Botond Dénes
88c5b2618c Merge 'Get rid of global variable "load_prio_keyspaces" (step 1)' from Calle Wilund
The concept is needed by enterprise functionality, but in the hunt for globals this sticks out and should be removed.
This is also partially prompted by the need to handle the keyspaces in the above set special on shutdown as well as startup. I.e. we need to ensure all user keyspaces are flushed/closed earlier then these. I.e. treat as "system" keyspace for this purpose.

These changes adds a "extension internal" keyspace set instead, which for now (until enterprise branches are updated) also included the "load_prio" set. However, it changes distributed loader to use the extension API interface instead, as well as adds shutdown special treatment to replica::database.

Closes #13335

* github.com:scylladb/scylladb:
  datasbase: Flush/close "extension internal" keyspaces after other user ks
  distributed_loader: Use extensions set of "extension internal" keyspaces
  db::extentions: Add "extensions internal" keyspace set
2023-03-28 08:35:10 +03:00
Calle Wilund
c3ec6a76c0 distributed_loader: Use extensions set of "extension internal" keyspaces
Refs #13334

Working towards removing load_prio_keyspaces. Use the extensions interface
to determine which keyspaces to initialize early.
2023-03-27 15:14:13 +00:00
Petr Gusev
5a5d664a5a init_system_keyspace: refactoring towards explicit load phases
We aim (#12642) to use the schema commit log
for raft tables. Now they are loaded at
the first call to init_system_keyspace in
main.cc, but the schema commitlog is only
initialized shortly before the second
call. This is important, since the schema
commitlog initialization
(database::before_schema_keyspace_init)
needs to access schema commitlog feature,
which is loaded from system.scylla_local
and therefore is only available after the
first init_system_keyspace call.

So the idea is to defer the loading of the raft tables
until the second call to init_system_keyspace,
just as it works for schema tables.
For this we need a tool to mark which tables
should be loaded in the first or second phase.

To do this, in this patch we introduce system_table_load_phase
enum. It's set in the schema_static_props for schema tables.
It replaces the system_keyspace::table_selector in the
signature of init_system_keyspace.

The call site for populate_keyspace in init_system_keyspace
was changed, table_selector.contains_keyspace was replaced with
db.local().has_keyspace. This check prevents calling
populate_keyspace(system_schema) on phase1, but allows for
populate_keyspace(system) on phase2 (to init raft tables).
On this second call some tables from system keyspace
(e.g. system.local) may have already been populated on phase1.
This check protects from double-populating them, since every
populated cf is marked as ready_for_writes.
2023-03-24 15:54:46 +04:00
Benny Halevy
c09d0f6694 everywhere: use sstables::generation_type
Use generation_type rather than generation_type::int_t
where possible and removed the deprecated
functions accepting the int_t.i

Ref #10459

Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
2023-03-22 13:59:47 +02:00
Benny Halevy
a8dc2fda29 sstables: make highest_generation_seen return optional generation
It is possible to find no generation in an empty
table directory, and in he future, with uuid generations
it'd be possible to find no numeric generations in the
directory.

Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
2023-03-22 13:55:23 +02:00
Benny Halevy
d4d480a374 test: sstables: use generation_type::int_t
Convert all users to use sstables::generation_type::int_t.
Further patches will continue to convert most to
using sstables::generation_type instead so we can
abstract the value type.

Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
2023-03-22 13:48:50 +02:00
Kamil Braun
5705df77a1 Merge 'Refactor schema, introduce schema_static_props and move several properties into it' from Gusev Petr
Our end goal (#12642) is to mark raft tables to use
schema commitlog. There are two similar
cases in code right now - `with_null_sharder`
and `set_wait_for_sync_to_commitlog` `schema_builder`
methods. The problem is that if we need to
mark some new schema with one of these methods
we need to do this twice - first in
a method describing the schema
(e.g. `system_keyspace::raft()`) and second in the
function `create_table_from_mutations`, which is not
obvious and easy to forget.

`create_table_from_mutations` is called when schema object
is reconstructed from mutations, `with_null_sharder`
and `set_wait_for_sync_to_commitlog` must be called from it
since the schema properties they describe are
not included in the mutation representation of the schema.

This series proposes to distinguish between the schema
properties that get into mutations and those that do not.
The former are described with `schema_builder`, while for
the latter we introduce `schema_static_props` struct and
the `schema_builder::register_static_configurator` method.
This way we can formulate a rule once in the code about
which schemas should have a null sharder/be synced, and it will
be enforced in all cases.

Closes #13170

* github.com:scylladb/scylladb:
  schema.hh: choose schema_commitlog based on schema_static_props flag
  schema.hh: use schema_static_props for wait_for_sync_to_commitlog
  schema.hh: introduce schema_static_props, use it for null_sharder
  database.cc: drop ensure_populated and mark_as_populated
2023-03-15 15:43:49 +01:00
Petr Gusev
00fc73d966 database.cc: drop ensure_populated and mark_as_populated
There was some logic to call mark_as_populate at
the appropriate places, but the _populated field
and the ensure_populated function were
not used by anyone.
2023-03-14 13:32:25 +04:00
Raphael S. Carvalho
2c4e141314 sstables: sstable_directory: Give sstable_info_vector a more descriptive name
Signed-off-by: Raphael S. Carvalho <raphaelsc@scylladb.com>
2023-03-13 15:40:43 -03:00
Pavel Emelyanov
b07570406e distributed_loader: Indentation fix after previous patch
Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
2023-03-10 16:01:09 +03:00
Pavel Emelyanov
f90ea6efc2 distributed_loader: Coroutinize reshape() helper
Drop do_with(), keep the needed variable on stack.
Replace repeat() with plain loop + yield.
Keep track of run_custom_job()'s exception.

Indentation is deliberately left broken.

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
2023-03-10 15:37:57 +03:00
Kefu Chai
43b6f7d8d3 distributed_loader: correct a typo in comment
s/to many/too many/

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
2023-03-08 18:17:43 +08:00
Kefu Chai
b6991f5056 distributed_loader: print log without using fmt::format()
logger.info() is able to format the given arguments with the format
string, so let's just let it do its job.

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
2023-03-08 18:17:43 +08:00
Pavel Emelyanov
bb0140531e sstable, dist.-loader: Introduce and use pick_up_from_upload() method
When "uploading" an sstable scylla uses a short-cut -- the sstable's
files are to be put into upload/ subdir by the caller, then scylla just
pulls them in in the cheapest way possible -- by relinking the files.

When this happens sstable also changes its generation, which is the only
place where this happens at all. For object storage uploading is not
going to be _that_ simple, so for now add an fs-specific method to pick
up an sstable from upload dir with the intent to generalize it (if
possible) when object-storage uploading appears.

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
2023-02-21 17:40:00 +03:00
Pavel Emelyanov
e67751ee92 distributed_loader: Let make_sstables_available choose target directory
When sstables are loaded from upload/ subdir, the final step is to move
them from this directory into base or staging one. The uploading code
evaluates the target directory, then pushes it down the stack towards
make_sstables_available() method.

This patch replaces the path argument with bool to_staging one. The
goal is to remove the knowlege of exact sstable location (nowadays --
its files' path) from the distributed loader and keep it in sstable
object itself. Next patches will make full use of this change.

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
2023-02-21 17:23:59 +03:00
Kefu Chai
0cb842797a treewide: do not define/capture unused variables
these warnings are found by Clang-17 after removing
`-Wno-unused-lambda-capture` and '-Wno-unused-variable' from
the list of disabled warnings in `configure.py`.

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
2023-02-15 22:57:18 +02:00
Pavel Emelyanov
0c7efe38e1 distributed_loader: Rename table_population_metadata
It used to be just metadata by providing the meta for population, now it
does the population by itself, so rename it.

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
2023-02-15 20:15:04 +03:00
Pavel Emelyanov
15926b22f4 distributed_loader: Dont check for directory presense twice
Both start_subdir() and populate_subdir() check for the directory to
exist with explicit file_exists() check. That's excessive, if the
directory wasn't there in the former call, the latter can get this by
checking the _sstable_directories map.

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
2023-02-15 20:15:04 +03:00
Pavel Emelyanov
eb477a13ad distributed_loader: Move populate calls into metadata.start()
This makes the metadata class export even shorter API, keeps the three
sub-directories scanned in one place and allows removing the zero-shard
assertion.

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
2023-02-15 20:15:04 +03:00
Pavel Emelyanov
123a82adb2 distributed_loader: Remove local aliases and exporters
After previous patch all local alias references in
populate_column_family() are no longer requires. Neither are the
exporting calls from the table_population_metadata class.

Some non-obvious change is capturing 'this' instead of 'global_table' on
calls that are cross-shard. That's OK, table_population_metadata is not
sharded<> and is designed for cross-shard usage too.

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
2023-02-15 19:57:41 +03:00
Pavel Emelyanov
16fca3fa8a distributed_loader: Move populate_column_family() into population meta
This ownership change also requires the auto& = *this alias and extra
specification where to call reshard() and reshape() from.

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
2023-02-15 19:57:41 +03:00
Pavel Emelyanov
40de737b36 sstable_directory: Rename remove_input_sstables_from_reshaping()
It unlinks unshared sstables filtering some of them out. Name it
according to what it does without mentioning reshape/reshard.

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
2023-02-08 15:00:44 +03:00
Pavel Emelyanov
a1dc251214 sstable_directory: Make use of remove_sstables() helper
Currently it's called remove_input_sstables_from_resharding() but it's
just unlinks sstables in parallel from the given list. So rename it not
to mention reshard and also make use of this "new" helper in the
remove_input_sstables_from_reshaping(), it needs exactly the same
functionality.

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
2023-02-08 15:00:44 +03:00
Pavel Emelyanov
cb36f5e581 sstable_directory: Merge output sstables collecting methods
There are two of them collecting sstables from resharding and reshaping.
Both doing the same job except for the latter doesn't expect the list to
contain remote sstables.

This patch merges them together with the help of an extra sanity boolean
to check for the remote sstable not in the list. And renames the method
not to mention reshape/reshard.

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
2023-02-08 15:00:41 +03:00
Pavel Emelyanov
73d458cf89 distributed_loader: Remove max_compaction_threshold argument from reshard()
Since the whole reshard() is local to dist. loader code now, the caller
of the reshard helper may let this method get the threshold itself

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
2023-02-07 19:31:43 +03:00
Pavel Emelyanov
25aaa45256 distributed_loader: Remove compaction_manager& argument from reshard()
It can be obtained from the table&

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
2023-02-07 19:31:43 +03:00
Pavel Emelyanov
15547f1b5b sstable_directory: Move the .reshard() to distributed_loader
Now all the reshading logic is accumulated in distributed loader and the
sstable_directory is just the place where sstables are collected.

The changes summary is:
- add sstable_directory as argument (used to be "this")
- replace all "this" captures with &dir ones
- remove temporary namespace gap and declaration from sst-dir class

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
2023-02-07 19:31:43 +03:00
Pavel Emelyanov
ab5f48d496 sstable_directory: Add helper to load foreign sstable
This is to generalize the code duplication between .reshard() and
existing .load_foreign_sstables() (plural form).

Make it coroutinized right at once.

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
2023-02-07 19:31:43 +03:00
Pavel Emelyanov
e6e65c87d5 sstable_directory: Add io-prio argument to .reshard()
Now it gets one from this-> but the method is becoming static one in
distributed_loader which only has it as an argument. That's not big deal
as the current IO class is going to be derived from current sched group,
so this extra arg will go away at all some day.

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
2023-02-07 19:31:41 +03:00
Pavel Emelyanov
a32d2b6d6a sstable_directory: Move reshard() to distributed_loader.cc
Just move the code and create temporary namespace gap for that

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
2023-02-07 19:31:12 +03:00