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

Method __expunge

src/state/log.cpp:597–623  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

595
596
597Future<bool> LogStorageProcess::__expunge(const Entry& entry)
598{
599 Option<Snapshot> snapshot = snapshots.get(entry.name());
600
601 if (snapshot.isNone()) {
602 return false;
603 }
604
605 // Check the version first.
606 if (id::UUID::fromBytes(snapshot->entry.uuid()).get() !=
607 id::UUID::fromBytes(entry.uuid()).get()) {
608 return false;
609 }
610
611 // Now serialize and append an expunge operation.
612 Operation operation;
613 operation.set_type(Operation::EXPUNGE);
614 operation.mutable_expunge()->set_name(entry.name());
615
616 string value;
617 if (!operation.SerializeToString(&value)) {
618 return Failure("Failed to serialize Operation");
619 }
620
621 return writer.append(value)
622 .then(defer(self(), &Self::___expunge, entry, lambda::_1));
623}
624
625
626Future<bool> LogStorageProcess::___expunge(

Callers

nothing calls this directly

Calls 7

FailureClass · 0.85
deferFunction · 0.85
getMethod · 0.45
nameMethod · 0.45
isNoneMethod · 0.45
thenMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected