Adding new retryable error type for blob granule requests (#8023)

This commit is contained in:
Josh Slocum 2022-08-30 08:07:10 -05:00 committed by GitHub
parent 825a58880e
commit d90cdcc498
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -7208,7 +7208,8 @@ Future<Void> Transaction::onError(Error const& e) {
if (e.code() == error_code_not_committed || e.code() == error_code_commit_unknown_result ||
e.code() == error_code_database_locked || e.code() == error_code_commit_proxy_memory_limit_exceeded ||
e.code() == error_code_grv_proxy_memory_limit_exceeded || e.code() == error_code_process_behind ||
e.code() == error_code_batch_transaction_throttled || e.code() == error_code_tag_throttled) {
e.code() == error_code_batch_transaction_throttled || e.code() == error_code_tag_throttled ||
e.code() == error_code_blob_granule_request_failed) {
if (e.code() == error_code_not_committed)
++trState->cx->transactionsNotCommitted;
else if (e.code() == error_code_commit_unknown_result)
@ -7978,10 +7979,8 @@ ACTOR Future<Standalone<VectorRef<BlobGranuleChunkRef>>> readBlobGranulesActor(
e.name());
}
// worker is up but didn't actually have granule, or connection failed
if (e.code() == error_code_wrong_shard_server || e.code() == error_code_connection_failed ||
e.code() == error_code_unknown_tenant) {
// need to re-read mapping, throw transaction_too_old so client retries. TODO better error?
throw transaction_too_old();
if (e.code() == error_code_wrong_shard_server || e.code() == error_code_connection_failed) {
throw blob_granule_request_failed();
}
throw e;
}

View File

@ -99,6 +99,7 @@ ERROR( data_move_cancelled, 1075, "Data move was cancelled" )
ERROR( data_move_dest_team_not_found, 1076, "Dest team was not found for data move" )
ERROR( blob_worker_full, 1077, "Blob worker cannot take on more granule assignments" )
ERROR( grv_proxy_memory_limit_exceeded, 1078, "GetReadVersion proxy memory limit exceeded" )
ERROR( blob_granule_request_failed, 1079, "BlobGranule request failed" )
ERROR( broken_promise, 1100, "Broken promise" )
ERROR( operation_cancelled, 1101, "Asynchronous operation cancelled" )