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

Method truncate

src/log/log.cpp:594–610  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

592
593
594Future<Option<Log::Position>> LogWriterProcess::truncate(
595 const Log::Position& to)
596{
597 VLOG(1) << "Attempting to truncate the log to " << to.value;
598
599 if (coordinator == nullptr) {
600 return Failure("No election has been performed");
601 }
602
603 if (error.isSome()) {
604 return Failure(error.get());
605 }
606
607 return coordinator->truncate(to.value)
608 .then(lambda::bind(&Self::position, lambda::_1))
609 .onFailed(defer(self(), &Self::failed, "Failed to truncate", lambda::_1));
610}
611
612
613Option<Log::Position> LogWriterProcess::position(

Callers 8

restoreMethod · 0.45
persistMethod · 0.45
watchedMethod · 0.45
writeMethod · 0.45
persistMethod · 0.45
TYPED_TESTFunction · 0.45
TEST_FFunction · 0.45
jquery.pailer.jsFile · 0.45

Calls 7

FailureClass · 0.85
deferFunction · 0.85
bindFunction · 0.50
dispatchFunction · 0.50
isSomeMethod · 0.45
getMethod · 0.45
thenMethod · 0.45

Tested by 2

TYPED_TESTFunction · 0.36
TEST_FFunction · 0.36