gossiper: lock_endpoint_update_semaphore: get_units with _abort_source

Locking the _endpoint_update_semaphore should be abortable with the
gossiper _abort_source.  No further processing should
be done once abort is requested.

Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
This commit is contained in:
Benny Halevy
2023-08-24 11:08:35 +03:00
parent d5dff1a16e
commit 85f553e723

View File

@@ -818,7 +818,7 @@ future<semaphore_units<>> gossiper::lock_endpoint_update_semaphore() {
if (this_shard_id() != 0) {
on_internal_error(logger, "must be called on shard 0");
}
return get_units(_endpoint_update_semaphore, 1);
return get_units(_endpoint_update_semaphore, 1, _abort_source);
}
future<> gossiper::mutate_live_and_unreachable_endpoints(std::function<void(gossiper&)> func) {