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

Method getLastCompactedVersion

fdbserver/ConfigNode.actor.cpp:147–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145 }
146
147 ACTOR static Future<Version> getLastCompactedVersion(ConfigNodeImpl* self) {
148 Optional<Value> value = wait(self->kvStore->readValue(lastCompactedVersionKey));
149 state Version lastCompactedVersion = 0;
150 if (value.present()) {
151 lastCompactedVersion = BinaryReader::fromStringRef<Version>(value.get(), IncludeVersion());
152 } else {
153 self->kvStore->set(
154 KeyValueRef(lastCompactedVersionKey, BinaryWriter::toValue(lastCompactedVersion, IncludeVersion())));
155 wait(self->kvStore->commit());
156 }
157 return lastCompactedVersion;
158 }
159
160 // Returns all commit annotations between for commits with version in [startVersion, endVersion]
161 ACTOR static Future<Standalone<VectorRef<VersionedConfigCommitAnnotationRef>>> getAnnotations(ConfigNodeImpl* self,

Callers

nothing calls this directly

Calls 7

IncludeVersionFunction · 0.85
getMethod · 0.65
setMethod · 0.65
commitMethod · 0.65
KeyValueRefClass · 0.50
readValueMethod · 0.45
presentMethod · 0.45

Tested by

no test coverage detected