mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-15 02:18:39 +08:00
catch grv_proxy_memory_limit_exceeded in getConsistentReadVersion
This commit is contained in:
parent
3ce737b2fa
commit
9fe12a256b
@ -6778,10 +6778,12 @@ ACTOR Future<GetReadVersionReply> getConsistentReadVersion(SpanContext parentSpa
|
||||
if (e.code() != error_code_broken_promise && e.code() != error_code_batch_transaction_throttled &&
|
||||
e.code() != error_code_grv_proxy_memory_limit_exceeded)
|
||||
TraceEvent(SevError, "GetConsistentReadVersionError").error(e);
|
||||
if ((e.code() == error_code_batch_transaction_throttled ||
|
||||
e.code() == error_code_grv_proxy_memory_limit_exceeded) &&
|
||||
!cx->apiVersionAtLeast(630)) {
|
||||
if (e.code() == error_code_batch_transaction_throttled && !cx->apiVersionAtLeast(630)) {
|
||||
wait(delayJittered(5.0));
|
||||
} else if (e.code() == error_code_grv_proxy_memory_limit_exceeded) {
|
||||
// FIXME(xwang): the better way is to let this error broadcast to transaction.onError(e), otherwise the
|
||||
// txn->cx counter doesn't make sense
|
||||
wait(delayJittered(CLIENT_KNOBS->GRV_ERROR_RETRY_DELAY));
|
||||
} else {
|
||||
throw;
|
||||
}
|
||||
@ -6818,7 +6820,6 @@ ACTOR Future<Void> readVersionBatcher(DatabaseContext* cx,
|
||||
|
||||
// dynamic batching
|
||||
state PromiseStream<double> replyTimes;
|
||||
state PromiseStream<Error> _errorStream;
|
||||
state double batchTime = 0;
|
||||
state Span span("NAPI:readVersionBatcher"_loc);
|
||||
loop {
|
||||
|
Loading…
x
Reference in New Issue
Block a user