Skip to content

Commit

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

Differential Revision: D52200811

fbshipit-source-id: ba26aa6b07b7a77362953b3d8a80758fd471c545
  • Loading branch information
mitrandir77 authored and facebook-github-bot committed Jan 3, 2024
1 parent 8b115a8 commit 75d0ef9
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions eden/mononoke/common/rust/sql_ext/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ caching_ext = { version = "0.1.0", path = "../caching_ext" }
fbinit = { version = "0.1.2", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "main" }
futures = { version = "0.3.28", features = ["async-await", "compat"] }
itertools = "0.11.0"
justknobs = { version = "0.1.0", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "main" }
maplit = "1.0"
memcache = { version = "0.1.0", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "main" }
mysql_async = "0.31.2"
Expand Down
1 change: 1 addition & 0 deletions eden/mononoke/common/rust/sql_ext/TARGETS
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ rust_library(
"fbsource//third-party/rust:twox-hash",
"//common/rust/mysql:mysql_client",
"//common/rust/shed/fbinit:fbinit",
"//common/rust/shed/justknobs_stub:justknobs",
"//common/rust/shed/memcache_stub:memcache",
"//common/rust/shed/sql:sql",
"//common/rust/thrift/srclient:srclient",
Expand Down
2 changes: 1 addition & 1 deletion eden/mononoke/common/rust/sql_ext/src/mononoke_queries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ where
T: Send + Abomonation + MemcacheEntity + Clone + 'static,
Fut: Future<Output = Result<T>> + Send,
{
if tunables().disable_sql_auto_cache().unwrap_or_default() {
if let Ok(true) = justknobs::eval("scm/mononoke:sql_disable_auto_cache", None, None) {
return query_with_retry_no_cache(&do_query).await;
}
let fetch = || query_with_retry_no_cache(&do_query);
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 @@ -305,8 +305,6 @@ pub struct MononokeTunables {

// Disable SQL queries being retried after admission control errors
disable_sql_auto_retries: TunableBool,
// Disable SQL queries being cached using `cacheable` keyword
disable_sql_auto_cache: TunableBool,
// Enable derivation on service per repo
enable_remote_derivation: TunableBoolByRepo,

Expand Down

0 comments on commit 75d0ef9

Please sign in to comment.