MCPcopy Create free account
hub / github.com/FoundationDB/fdb-document-layer / getMetadataVersion

Method getMetadataVersion

src/QLContext.actor.cpp:749–759  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

747}
748
749Future<uint64_t> CollectionContext::getMetadataVersion() {
750 // FIXME: Wow how many abstractions does this violate at once?
751 Future<Optional<FDBStandalone<StringRef>>> fov = cx->getTransaction()->tr->get(StringRef(unbound->getVersionKey()));
752 Future<uint64_t> ret = map(fov, [](Optional<FDBStandalone<StringRef>> ov) -> uint64_t {
753 if (!ov.present())
754 return 0;
755 else
756 return *((uint64_t*)(ov.get().begin()));
757 });
758 return ret;
759}
760
761Future<Standalone<StringRef>> IReadWriteContext::getValueEncodedId() {
762 // FIXME: this is inefficient in about 12 different ways

Callers 3

Calls 4

getTransactionMethod · 0.80
getVersionKeyMethod · 0.80
beginMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected