repair: Move unused db captures

Similarly to previous patch -- the db captures can also be relaxed
in some places.

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
This commit is contained in:
Pavel Emelyanov
2021-05-13 11:58:31 +03:00
parent 96b546797e
commit 60cbb700ef

View File

@@ -1389,10 +1389,9 @@ future<> repair_service::do_sync_data_using_repair(
}
future<> repair_service::bootstrap_with_repair(locator::token_metadata_ptr tmptr, std::unordered_set<dht::token> bootstrap_tokens) {
seastar::sharded<database>& db = get_db();
using inet_address = gms::inet_address;
return seastar::async([this, &db, tmptr = std::move(tmptr), tokens = std::move(bootstrap_tokens)] () mutable {
return seastar::async([this, tmptr = std::move(tmptr), tokens = std::move(bootstrap_tokens)] () mutable {
seastar::sharded<database>& db = get_db();
auto keyspaces = db.local().get_non_system_keyspaces();
auto myip = utils::fb_utilities::get_broadcast_address();
auto reason = streaming::stream_reason::bootstrap;
@@ -1562,10 +1561,9 @@ future<> repair_service::bootstrap_with_repair(locator::token_metadata_ptr tmptr
}
future<> repair_service::do_decommission_removenode_with_repair(locator::token_metadata_ptr tmptr, gms::inet_address leaving_node, shared_ptr<node_ops_info> ops) {
seastar::sharded<database>& db = get_db();
using inet_address = gms::inet_address;
return seastar::async([this, &db, tmptr = std::move(tmptr), leaving_node = std::move(leaving_node), ops] () mutable {
return seastar::async([this, tmptr = std::move(tmptr), leaving_node = std::move(leaving_node), ops] () mutable {
seastar::sharded<database>& db = get_db();
auto myip = utils::fb_utilities::get_broadcast_address();
auto keyspaces = db.local().get_non_system_keyspaces();
bool is_removenode = myip != leaving_node;
@@ -1780,9 +1778,8 @@ future<> abort_repair_node_ops(utils::UUID ops_uuid) {
}
future<> repair_service::do_rebuild_replace_with_repair(locator::token_metadata_ptr tmptr, sstring op, sstring source_dc, streaming::stream_reason reason) {
seastar::sharded<database>& db = get_db();
return seastar::async([this, &db, tmptr = std::move(tmptr), source_dc = std::move(source_dc), op = std::move(op), reason] () mutable {
return seastar::async([this, tmptr = std::move(tmptr), source_dc = std::move(source_dc), op = std::move(op), reason] () mutable {
seastar::sharded<database>& db = get_db();
auto keyspaces = db.local().get_non_system_keyspaces();
auto myip = utils::fb_utilities::get_broadcast_address();
size_t nr_ranges_total = 0;