gossiper: remove_endpoint: lock_endpoint if needed

lock_endpoint to serialize changes to endpoint state
and calling the on_remove notification.

Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
This commit is contained in:
Benny Halevy
2023-07-26 13:49:18 +03:00
parent 13124f0db4
commit 3293c45682

View File

@@ -662,7 +662,8 @@ future<> gossiper::force_remove_endpoint(inet_address endpoint, permit_id pid) {
}
future<> gossiper::remove_endpoint(inet_address endpoint, permit_id pid) {
// FIXME: lock_endpoint (with null pid)
auto permit = co_await lock_endpoint(endpoint, pid);
pid = permit.id();
// do subscribers first so anything in the subscriber that depends on gossiper state won't get confused
try {