Skip to content

Commit

Permalink
migrate disable_sql_auto_retries to jk
Browse files Browse the repository at this point in the history
Reviewed By: clara-9

Differential Revision: D52200810

fbshipit-source-id: 882d2b7b830fe2f21055648187eb049a3981c1f2
  • Loading branch information
mitrandir77 authored and facebook-github-bot committed Jan 3, 2024
1 parent 75d0ef9 commit 188beea
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion eden/mononoke/common/rust/sql_ext/TARGETS
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ rust_library(
"//eden/mononoke/common/retry:retry",
"//eden/mononoke/common/rust/caching_ext:caching_ext",
"//eden/mononoke/repo_attributes/sql_query_config:sql_query_config",
"//eden/mononoke/tunables:tunables",
] + ([] if rust_oss.is_oss_build() else [
"fbsource//third-party/rust:arc-swap",
"fbsource//third-party/rust:futures",
Expand All @@ -48,5 +47,6 @@ rust_library(
"//eden/mononoke/common/time_measuring:time_measuring",
"//crypto/keychain_service:if-rust",
"//crypto/keychain_service:if-rust-srclients",
"//eden/mononoke/tunables:tunables",
]),
)
3 changes: 1 addition & 2 deletions eden/mononoke/common/rust/sql_ext/src/mononoke_queries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ use memcache::KeyGen;
use retry::retry;
use retry::RetryLogic;
use sql_query_config::CachingConfig;
use tunables::tunables;

const RETRY_ATTEMPTS: usize = 2;

Expand Down Expand Up @@ -414,7 +413,7 @@ where
T: Send + 'static,
Fut: Future<Output = Result<T>>,
{
if tunables().disable_sql_auto_retries().unwrap_or_default() {
if let Ok(true) = justknobs::eval("scm/mononoke:sql_disable_auto_retries", None, None) {
return do_query().await;
}
Ok(retry(
Expand Down
2 changes: 0 additions & 2 deletions eden/mononoke/tunables/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,6 @@ pub struct MononokeTunables {
// Override author check during squashing
megarepo_override_author_check: TunableBoolByRepo,

// Disable SQL queries being retried after admission control errors
disable_sql_auto_retries: TunableBool,
// Enable derivation on service per repo
enable_remote_derivation: TunableBoolByRepo,

Expand Down

0 comments on commit 188beea

Please sign in to comment.