Merge 'Small gossiper and migration_manager cleanups' from Gleb

Some assorted cleanups here: consolidation of schema agreement waiting
into a single place and removing unused code from the gossiper.

CI: https://jenkins.scylladb.com/job/scylla-master/job/scylla-ci/1458/

Reviewed-by: Konstantin Osipov <kostja@scylladb.com>

* gleb/gossiper-cleanups of github.com:scylladb/scylla-dev:
  storage_service: avoid unneeded copies in on_change
  storage_service: remove check that is always true
  storage_service: rename handle_state_removing to handle_state_removed
  storage_service: avoid string copy
  storage_service: delete code that handled REMOVING_TOKENS state
  gossiper: remove code related to advertising REMOVING_TOKEN state
  migration_manager: add wait_for_schema_agreement() function
This commit is contained in:
Pavel Emelyanov
2023-05-27 10:49:54 +03:00
18 changed files with 37 additions and 290 deletions

View File

@@ -1794,9 +1794,8 @@ future<> view_builder::start(service::migration_manager& mm) {
// or `on_update_view` events.
auto units = get_units(_sem, 1).get0();
// Wait for schema agreement even if we're a seed node.
while (!mm.have_schema_agreement()) {
seastar::sleep_abortable(500ms, _as).get();
}
mm.wait_for_schema_agreement(_db, db::timeout_clock::time_point::max(), &_as).get();
auto built = _sys_ks.load_built_views().get0();
auto in_progress = _sys_ks.load_view_build_progress().get0();
setup_shard_build_step(vbi, std::move(built), std::move(in_progress));