From cc4b28223601b7f630c9b273a08e1d52b6eee3de Mon Sep 17 00:00:00 2001 From: Chaoguang Lin Date: Thu, 19 Nov 2020 13:17:38 -0800 Subject: [PATCH] Remove the incorrect(unnecessary) versioning stuff, since the error is thrown by the server --- fdbclient/SpecialKeySpace.actor.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/fdbclient/SpecialKeySpace.actor.cpp b/fdbclient/SpecialKeySpace.actor.cpp index 33106e098b..c72c65bed7 100644 --- a/fdbclient/SpecialKeySpace.actor.cpp +++ b/fdbclient/SpecialKeySpace.actor.cpp @@ -560,10 +560,7 @@ ACTOR Future> ddMetricsGetRangeActor(ReadYourWritesTr return result; } catch (Error& e) { state Error err(e); - // dd_not_found is introduced in 700, and operation_failed is used in previous version - auto err_code = - ryw->getDatabase()->apiVersionAtLeast(700) ? error_code_dd_not_found : error_code_operation_failed; - if (e.code() == err_code) { + if (e.code() == error_code_dd_not_found) { TraceEvent(SevWarnAlways, "DataDistributorNotPresent") .detail("Operation", "DDMetricsReqestThroughSpecialKeys"); wait(delayJittered(FLOW_KNOBS->PREVENT_FAST_SPIN_DELAY));