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

Method getAddressesForKey

fdbclient/MultiVersionTransaction.actor.cpp:195–207  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

193}
194
195ThreadFuture<Standalone<VectorRef<const char*>>> DLTransaction::getAddressesForKey(const KeyRef& key) {
196 FdbCApi::FDBFuture* f = api->transactionGetAddressesForKey(tr, key.begin(), key.size());
197
198 return toThreadFuture<Standalone<VectorRef<const char*>>>(api, f, [](FdbCApi::FDBFuture* f, FdbCApi* api) {
199 const char** addresses;
200 int count;
201 FdbCApi::fdb_error_t error = api->futureGetStringArray(f, &addresses, &count);
202 ASSERT(!error);
203
204 // The memory for this is stored in the FDBFuture and is released when the future gets destroyed
205 return Standalone<VectorRef<const char*>>(VectorRef<const char*>(addresses, count), Arena());
206 });
207}
208
209ThreadFuture<Standalone<StringRef>> DLTransaction::getVersionstamp() {
210 if (!api->transactionGetVersionstamp) {

Callers

nothing calls this directly

Calls 5

getTransactionFunction · 0.85
abortableFutureFunction · 0.85
ArenaClass · 0.50
beginMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected