void ReplicatedLog::OnAppendComplete() { // TODO: this is not a complete solution if (paxosID < context->GetHighestPaxosID()) context->GetDatabase()->Commit(); if (!commitChaining) { acceptor.WriteState(); context->GetDatabase()->Commit(); } TryAppendNextValue(); }
void ReplicatedLog::OnAppendComplete() { waitingOnAppend = false; NewPaxosRound(); // increments paxosID, clears proposer, acceptor if (context->IsLeaseKnown() && paxosID <= context->GetHighestPaxosID()) RequestChosen(context->GetLeaseOwner()); if (paxosID < context->GetHighestPaxosID()) context->GetDatabase()->Commit(); if (!context->UseCommitChaining()) { acceptor.WriteState(); context->GetDatabase()->Commit(); } context->OnMessageProcessed(); TryAppendNextValue(); }