Skip to content

Commit

Permalink
add justknob for disabling megarepo mutable renames
Browse files Browse the repository at this point in the history
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
  • Loading branch information
markbt authored and facebook-github-bot committed Nov 13, 2024
1 parent 23760b5 commit e1682c6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
14 changes: 11 additions & 3 deletions eden/mononoke/megarepo_api/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -463,16 +463,24 @@ pub trait MegarepoOp<R> {
)
.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,
moved_bcs.get_changeset_id(),
mover,
directory_mover,
)
.await?;
.await?
};

let source_and_moved_changeset = SourceAndMovedChangesets {
source: cs_id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit e1682c6

Please sign in to comment.