New status cluster_not_fully_recovered

This commit is contained in:
sramamoorthy 2019-04-29 20:30:13 -07:00 committed by Alex Miller
parent 591ff96b93
commit 925499954b
5 changed files with 10 additions and 4 deletions

View File

@ -2697,7 +2697,8 @@ ACTOR static Future<Void> tryCommit( Database cx, Reference<TransactionLogInfo>
&& e.code() != error_code_not_committed
&& e.code() != error_code_database_locked
&& e.code() != error_code_proxy_memory_limit_exceeded
&& e.code() != error_code_transaction_not_permitted)
&& e.code() != error_code_transaction_not_permitted
&& e.code() != error_code_transaction_not_fully_recovered)
TraceEvent(SevError, "TryCommitError").error(e);
if (trLogInfo)
trLogInfo->addLog(FdbClientLogEvents::EventCommitError(startTime, static_cast<int>(e.code()), req));

View File

@ -41,6 +41,7 @@ struct ConflictBatch {
TransactionTooOld,
TransactionCommitted,
TransactionNotPermitted,
TransactionNotFullyRecovered,
};
void addTransaction( const CommitTransactionRef& transaction );

View File

@ -797,9 +797,9 @@ ACTOR Future<Void> commitBatch(
// Currently, snapshot of old tlog generation is not
// supported and hence failing the snapshot request until
// cluster is fully_recovered.
TraceEvent("ExecTransactionConflict")
TraceEvent("ExecTransactionNotFullyRecovered")
.detail("TransactionNum", transactionNum);
committed[transactionNum] = ConflictBatch::TransactionNotPermitted;
committed[transactionNum] = ConflictBatch::TransactionNotFullyRecovered;
} else {
// Send the ExecOp to
// - all the storage nodes in a single region and
@ -1070,6 +1070,9 @@ ACTOR Future<Void> commitBatch(
else if (committed[t] == ConflictBatch::TransactionNotPermitted) {
trs[t].reply.sendError(transaction_not_permitted());
}
else if (committed[t] == ConflictBatch::TransactionNotFullyRecovered) {
trs[t].reply.sendError(transaction_not_fully_recovered());
}
else {
trs[t].reply.sendError(not_committed());
}

View File

@ -204,7 +204,7 @@ public: // workload functions
++retry;
TraceEvent(retry > 100 ? SevWarn : SevInfo, "SnapCreateCommandFailed").detail("Error", e.what());
if (retry > 100) {
TraceEvent(SevError, "SnapCreateCommandFailed").detail("Error", e.what());
TraceEvent(SevError, "SnapCreateCommandExhausted").detail("Error", e.what());
throw operation_failed();
}
}

View File

@ -66,6 +66,7 @@ ERROR( proxy_memory_limit_exceeded, 1042, "Proxy commit memory limit exceeded" )
ERROR( shutdown_in_progress, 1043, "Operation no longer supported due to shutdown" )
ERROR( serialization_failed, 1044, "Failed to deserialize an object" )
ERROR( transaction_not_permitted, 1045, "Operation not permitted")
ERROR( transaction_not_fully_recovered, 1046, "Cluster not fully_recovered")
ERROR( broken_promise, 1100, "Broken promise" )
ERROR( operation_cancelled, 1101, "Asynchronous operation cancelled" )