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

Method append

src/log/coordinator.cpp:306–323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

304
305
306Future<Option<uint64_t>> CoordinatorProcess::append(const string& bytes)
307{
308 if (state == INITIAL || state == ELECTING) {
309 return None();
310 } else if (state == WRITING) {
311 return Failure("Coordinator is currently writing");
312 }
313
314 Action action;
315 action.set_position(index);
316 action.set_promised(proposal);
317 action.set_performed(proposal);
318 action.set_type(Action::APPEND);
319 Action::Append* append = action.mutable_append();
320 append->set_bytes(bytes);
321
322 return write(action);
323}
324
325
326Future<Option<uint64_t>> CoordinatorProcess::truncate(uint64_t to)

Callers

nothing calls this directly

Calls 4

NoneClass · 0.85
FailureClass · 0.85
writeFunction · 0.70
dispatchFunction · 0.50

Tested by

no test coverage detected