mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-15 02:18:39 +08:00
Clean up clientFailures periodically
This commit is contained in:
parent
d004703cc8
commit
adc1025fa1
@ -204,7 +204,6 @@ class ConfigBroadcasterImpl {
|
||||
wait(watcher);
|
||||
TraceEvent(SevDebug, "ConfigBroadcastClientDied", self->id).detail("ClientID", clientUID);
|
||||
self->clients.erase(clientUID);
|
||||
// TODO: Erase clientUID from clientFailures at some point
|
||||
return Void();
|
||||
}
|
||||
|
||||
@ -225,6 +224,18 @@ class ConfigBroadcasterImpl {
|
||||
return Void();
|
||||
}
|
||||
|
||||
// Clean up clientFailures futures. The values in this map should only
|
||||
// be used for testing, and cleaning them up here ensures tests still
|
||||
// have enough time to read the future while making sure the map
|
||||
// doesn't grow unbounded.
|
||||
for (auto it = impl->clientFailures.begin(); it != impl->clientFailures.end();) {
|
||||
if (it->second.isReady()) {
|
||||
it = impl->clientFailures.erase(it);
|
||||
} else {
|
||||
++it;
|
||||
}
|
||||
}
|
||||
|
||||
TraceEvent(SevDebug, "ConfigBroadcasterRegisteringWorker", impl->id)
|
||||
.detail("ClientID", broadcastInterface.id())
|
||||
.detail("MostRecentVersion", impl->mostRecentVersion)
|
||||
|
@ -910,5 +910,3 @@ TEST_CASE("/fdbserver/ConfigDB/Transaction/BadRangeRead") {
|
||||
}
|
||||
return Void();
|
||||
}
|
||||
|
||||
// TODO: Test worker failure detection on ConfigBroadcaster
|
||||
|
Loading…
x
Reference in New Issue
Block a user