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
| 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 |
| 134 | ThreadFuture<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 | |
| 142 | ThreadFuture<Key> ThreadSafeDatabase::purgeBlobGranules(const KeyRangeRef& keyRange, Version purgeVersion, bool force) { |
| 143 | DatabaseContext* db = this->db; |
no test coverage detected