MCPcopy Create free account
hub / github.com/apple/foundationdb / startLegacyVersionMonitors

Method startLegacyVersionMonitors

fdbclient/MultiVersionTransaction.actor.cpp:2085–2096  ·  view source on GitHub ↗

Starts version monitors for old client versions that don't support connect packet monitoring (<= 5.0). Must be called from the main thread

Source from the content-addressed store, hash-verified

2083// Starts version monitors for old client versions that don't support connect packet monitoring (<= 5.0).
2084// Must be called from the main thread
2085void MultiVersionDatabase::DatabaseState::startLegacyVersionMonitors() {
2086 for (auto itr = legacyVersionMonitors.begin(); itr != legacyVersionMonitors.end(); ++itr) {
2087 while (itr != legacyVersionMonitors.end() && (*itr)->client->failed) {
2088 (*itr)->close();
2089 itr = legacyVersionMonitors.erase(itr);
2090 }
2091 if (itr != legacyVersionMonitors.end() &&
2092 (!dbProtocolVersion.present() || (*itr)->client->protocolVersion != dbProtocolVersion.get())) {
2093 (*itr)->startConnectionMonitor(Reference<DatabaseState>::addRef(this));
2094 }
2095 }
2096}
2097
2098// Cleans up state for the legacy version monitors to break reference cycles
2099void MultiVersionDatabase::DatabaseState::close() {

Callers

nothing calls this directly

Calls 7

closeMethod · 0.65
getMethod · 0.65
beginMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45
presentMethod · 0.45

Tested by

no test coverage detected