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

Method getVersionstamp

fdbclient/MultiVersionTransaction.actor.cpp:209–225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207}
208
209ThreadFuture<Standalone<StringRef>> DLTransaction::getVersionstamp() {
210 if (!api->transactionGetVersionstamp) {
211 return unsupported_operation();
212 }
213
214 FdbCApi::FDBFuture* f = api->transactionGetVersionstamp(tr);
215
216 return toThreadFuture<Standalone<StringRef>>(api, f, [](FdbCApi::FDBFuture* f, FdbCApi* api) {
217 const uint8_t* str;
218 int strLength;
219 FdbCApi::fdb_error_t error = api->futureGetKey(f, &str, &strLength);
220 ASSERT(!error);
221
222 // The memory for this is stored in the FDBFuture and is released when the future gets destroyed
223 return Standalone<StringRef>(StringRef(str, strLength), Arena());
224 });
225}
226
227ThreadFuture<int64_t> DLTransaction::getEstimatedRangeSizeBytes(const KeyRangeRef& keys) {
228 if (!api->transactionGetEstimatedRangeSizeBytes) {

Callers

nothing calls this directly

Calls 5

getTransactionFunction · 0.85
abortableFutureFunction · 0.85
getVersionstampMethod · 0.65
StringRefClass · 0.50
ArenaClass · 0.50

Tested by

no test coverage detected