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

Method getServerProtocol

fdbclient/ThreadSafeTransaction.cpp:134–140  ·  view source on GitHub ↗

Returns the protocol version reported by the coordinator this client is connected to If an expected version is given, the future won't return until the protocol version is different than expected Note: this will never return if the server is running a protocol from FDB 5.0 or older

Source from the content-addressed store, hash-verified

132// If an expected version is given, the future won't return until the protocol version is different than expected
133// Note: this will never return if the server is running a protocol from FDB 5.0 or older
134ThreadFuture<ProtocolVersion> ThreadSafeDatabase::getServerProtocol(Optional<ProtocolVersion> expectedVersion) {
135 DatabaseContext* db = this->db;
136 return onMainThread([db, expectedVersion]() -> Future<ProtocolVersion> {
137 db->checkDeferredError();
138 return db->getClusterProtocol(expectedVersion);
139 });
140}
141
142ThreadFuture<Key> ThreadSafeDatabase::purgeBlobGranules(const KeyRangeRef& keyRange, Version purgeVersion, bool force) {
143 DatabaseContext* db = this->db;

Callers 1

Calls 3

getClusterProtocolMethod · 0.80
onMainThreadFunction · 0.50
checkDeferredErrorMethod · 0.45

Tested by

no test coverage detected