Skip to content

Commit

Permalink
never allow fallback on resource exhausted
Browse files Browse the repository at this point in the history
Reviewed By: JakobDegen

Differential Revision: D61268688

fbshipit-source-id: 8bb9cfe0fdfa1e6400dab4e402725417be9783ac
  • Loading branch information
blackm00n authored and facebook-github-bot committed Aug 15, 2024
1 parent 3202559 commit be35134
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions app/buck2_execute_impl/src/executors/hybrid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,7 @@ where
CommandExecutionStatus::Error {
typ: CommandExecutionErrorType::StorageResourceExhausted,
..
} => {
ignore_fallback_tracker
|| self
.fallback_tracker
.can_fallback_when_storage_resource_exhausted()
}
} => ignore_fallback_tracker,
// Errors are infra errors and are always retried because that is the point of
// falling back.
CommandExecutionStatus::Error { .. } => {
Expand Down Expand Up @@ -549,23 +544,6 @@ impl FallbackTracker {
}
}

pub fn can_fallback_when_storage_resource_exhausted(&self) -> bool {
#[cfg(all(fbcode_build, target_os = "linux"))]
if hostcaps::is_prod() {
justknobs::eval(
"buck2/buck2:allow_storage_resource_exhausted_fallback",
None,
None,
)
.unwrap_or(false)
} else {
false
}

#[cfg(not(all(fbcode_build, target_os = "linux")))]
false
}

pub fn can_fallback(&self) -> bool {
let retried = self.count_fallbacks.fetch_add(1, Ordering::Relaxed);

Expand Down

0 comments on commit be35134

Please sign in to comment.