Merge 'migration_manager: retire global storage proxy refs' from Avi Kivity

Replace get_local_storage_proxy() and get_local_storage_proxy() with
constructor-provided references. Some unneeded cases were removed.

Test: unit (dev)

Closes #9816

* github.com:scylladb/scylla:
  migration_manager: replace uses of get_storage_proxy and get_local_storage_proxy with constructor-provided reference
  migration_manager: don't keep storage_proxy alive during schema_check verb
  mm: don't capture storage proxy shared_ptr during background schema merge
  mm: remove stats on schema version get
This commit is contained in:
Pavel Emelyanov
2021-12-17 17:53:08 +03:00
4 changed files with 46 additions and 46 deletions

View File

@@ -634,7 +634,7 @@ public:
proxy.start(std::ref(db), std::ref(gossiper), spcfg, std::ref(b), scheduling_group_key_create(sg_conf).get0(), std::ref(feature_service), std::ref(token_metadata), std::ref(erm_factory), std::ref(ms)).get();
auto stop_proxy = defer([&proxy] { proxy.stop().get(); });
mm.start(std::ref(mm_notif), std::ref(feature_service), std::ref(ms), std::ref(gossiper), std::ref(raft_gr)).get();
mm.start(std::ref(mm_notif), std::ref(feature_service), std::ref(ms), std::ref(proxy), std::ref(gossiper), std::ref(raft_gr)).get();
auto stop_mm = defer([&mm] { mm.stop().get(); });
cql3::query_processor::memory_config qp_mcfg = {memory::stats().total_memory() / 256, memory::stats().total_memory() / 2560};