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

Method commit

fdbserver/ConfigNode.actor.cpp:385–405  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

383 }
384
385 ACTOR static Future<Void> commit(ConfigNodeImpl* self, ConfigTransactionCommitRequest req) {
386 ConfigGeneration currentGeneration = wait(getGeneration(self));
387 if (req.generation.committedVersion != currentGeneration.committedVersion) {
388 ++self->failedCommits;
389 req.reply.sendError(commit_unknown_result());
390 return Void();
391 } else if (req.generation.liveVersion != currentGeneration.liveVersion) {
392 ++self->failedCommits;
393 req.reply.sendError(not_committed());
394 return Void();
395 }
396 Standalone<VectorRef<VersionedConfigMutationRef>> mutations;
397 for (const auto& mutation : req.mutations) {
398 mutations.emplace_back_deep(mutations.arena(), req.generation.liveVersion, mutation);
399 }
400 Standalone<VectorRef<VersionedConfigCommitAnnotationRef>> annotations;
401 annotations.emplace_back_deep(annotations.arena(), req.generation.liveVersion, req.annotation);
402 wait(commitMutations(self, mutations, annotations, req.generation.liveVersion));
403 req.reply.send(Void());
404 return Void();
405 }
406
407 ACTOR static Future<Void> serve(ConfigNodeImpl* self, ConfigTransactionInterface const* cti) {
408 loop {

Callers

nothing calls this directly

Calls 4

getGenerationFunction · 0.85
VoidClass · 0.50
sendErrorMethod · 0.45
sendMethod · 0.45

Tested by

no test coverage detected