Open 315567599 opened 1 week ago
重试三次,如果都冲突,则返回成功?!
{ BP->GetCommiterBP()->NewValue();
int iRetryCount = 3; int ret = PaxosTryCommitRet_OK; while(iRetryCount--) { TimeStat oTimeStat; oTimeStat.Point(); ret = NewValueGetIDNoRetry(sValue, llInstanceID, poSMCtx); if (ret != PaxosTryCommitRet_Conflict) { if (ret == 0) { BP->GetCommiterBP()->NewValueCommitOK(oTimeStat.Point()); } else { BP->GetCommiterBP()->NewValueCommitFail(); } break; } BP->GetCommiterBP()->NewValueConflict(); if (poSMCtx != nullptr && poSMCtx->m_iSMID == MASTER_V_SMID) { //master sm not retry break; } } return ret;
}
重试三次,如果都冲突,则返回成功?!
int Committer :: NewValueGetID(const std::string & sValue, uint64_t & llInstanceID, SMCtx * poSMCtx)
{ BP->GetCommiterBP()->NewValue();
}