From e1682c6ab96d03e59565fa758d81ee62d5c6d392 Mon Sep 17 00:00:00 2001 From: Mark Juggurnauth-Thomas Date: Wed, 13 Nov 2024 03:00:06 -0800 Subject: [PATCH] add justknob for disabling megarepo mutable renames Summary: Mutable renames created by megarepo_api are reaching scaling limits. Add a knob that lets us stop creating them. Reviewed By: andreacampi Differential Revision: D65817987 fbshipit-source-id: f6a76ae317bf14577585ff6bb5c417d3786acbce --- eden/mononoke/megarepo_api/src/common.rs | 14 +++++++++++--- .../just_knobs_defaults/just_knobs.json | 3 ++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/eden/mononoke/megarepo_api/src/common.rs b/eden/mononoke/megarepo_api/src/common.rs index 52d506fd01a4c..630f24a8e272c 100644 --- a/eden/mononoke/megarepo_api/src/common.rs +++ b/eden/mononoke/megarepo_api/src/common.rs @@ -463,8 +463,15 @@ pub trait MegarepoOp { ) .freeze()?; - let mutable_renames = self - .create_mutable_renames( + let mutable_renames = if let Ok(true) = justknobs::eval( + "scm/mononoke:megarepo_disable_mutable_rename_creation", + None, + Some(repo.repo_identity().name()), + ) { + // Skip creating mutable renames + Vec::new() + } else { + self.create_mutable_renames( ctx, repo, cs_id, @@ -472,7 +479,8 @@ pub trait MegarepoOp { mover, directory_mover, ) - .await?; + .await? + }; let source_and_moved_changeset = SourceAndMovedChangesets { source: cs_id, diff --git a/eden/mononoke/mononoke_macros/just_knobs_defaults/just_knobs.json b/eden/mononoke/mononoke_macros/just_knobs_defaults/just_knobs.json index c356ef607cdd8..1376a792372f3 100644 --- a/eden/mononoke/mononoke_macros/just_knobs_defaults/just_knobs.json +++ b/eden/mononoke/mononoke_macros/just_knobs_defaults/just_knobs.json @@ -41,7 +41,8 @@ "scm/mononoke:remote_gitimport_derive_ccsm": true, "scm/mononoke:changeset_path_context_use_skeleton_manifest_v2": true, "scm/mononoke:case_conflicts_check_use_ccsm": true, - "scm/mononoke:should_set_committer_info_to_author_info_if_empty": true + "scm/mononoke:should_set_committer_info_to_author_info_if_empty": true, + "scm/mononoke:megarepo_disable_mutable_rename_creation": false }, "ints": { "scm/mononoke_timeouts:repo_client_clone_timeout_secs": 14400,