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

Method update

src/log/replica.cpp:309–328  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

307
308
309bool ReplicaProcess::update(const Metadata::Status& status)
310{
311 Metadata metadata_;
312 metadata_.set_status(status);
313 metadata_.set_promised(promised());
314
315 Try<Nothing> persisted = storage->persist(metadata_);
316
317 if (persisted.isError()) {
318 LOG(ERROR) << "Error writing to log: " << persisted.error();
319 return false;
320 }
321
322 LOG(INFO) << "Persisted replica status to " << status;
323
324 // Update the cached metadata.
325 metadata.set_status(status);
326
327 return true;
328}
329
330
331bool ReplicaProcess::updatePromised(uint64_t promised)

Callers 9

_requestMethod · 0.45
updateReplicaStatusMethod · 0.45
executeMethod · 0.45
evolveFunction · 0.45
forwardMethod · 0.45
forwardMethod · 0.45
ProcessHppHeadersOptionFunction · 0.45

Calls 4

errorMethod · 0.65
dispatchFunction · 0.50
persistMethod · 0.45
isErrorMethod · 0.45

Tested by 1