MCPcopy Create free account
hub / github.com/apache/mesos / updatePromised

Method updatePromised

src/log/replica.cpp:331–350  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

329
330
331bool ReplicaProcess::updatePromised(uint64_t promised)
332{
333 Metadata metadata_;
334 metadata_.set_status(status());
335 metadata_.set_promised(promised);
336
337 Try<Nothing> persisted = storage->persist(metadata_);
338
339 if (persisted.isError()) {
340 LOG(ERROR) << "Error writing to log: " << persisted.error();
341 return false;
342 }
343
344 LOG(INFO) << "Persisted promised to " << promised;
345
346 // Update the cached metadata.
347 metadata.set_promised(promised);
348
349 return true;
350}
351
352
353// When handling replicated log protocol requests, we handle errors in

Callers

nothing calls this directly

Calls 4

statusFunction · 0.85
errorMethod · 0.65
persistMethod · 0.45
isErrorMethod · 0.45

Tested by

no test coverage detected