Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Remove --experimental_throttle_action_cache_check flag." #20162

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -920,6 +920,16 @@ public OutputPathsConverter() {
+ " of failing. This is to help use cquery diagnose failures in select.")
public boolean debugSelectsAlwaysSucceed;

@Option(
name = "experimental_throttle_action_cache_check",
defaultValue = "true",
converter = BooleanConverter.class,
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
metadataTags = OptionMetadataTag.EXPERIMENTAL,
effectTags = {OptionEffectTag.EXECUTION},
help = "Whether to throttle the check whether an action is cached.")
public boolean throttleActionCacheCheck;

/** Ways configured targets may provide the {@link Fragment}s they require. */
public enum IncludeConfigFragmentsEnum {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import com.google.devtools.build.lib.runtime.Command;
import com.google.devtools.build.lib.runtime.CommandEnvironment;
import com.google.devtools.build.lib.util.ResourceFileLoader;
import com.google.devtools.common.options.Converters.BooleanConverter;
import com.google.devtools.common.options.Option;
import com.google.devtools.common.options.OptionDocumentationCategory;
import com.google.devtools.common.options.OptionEffectTag;
Expand Down Expand Up @@ -253,16 +252,6 @@ public static class BuildGraveyardOptions extends OptionsBase {
help = "This option is deprecated and has no effect and will be removed in the future.")
public boolean deferParamFiles;

@Option(
name = "experimental_throttle_action_cache_check",
defaultValue = "true",
converter = BooleanConverter.class,
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
metadataTags = OptionMetadataTag.EXPERIMENTAL,
effectTags = {OptionEffectTag.EXECUTION},
help = "no-op")
public boolean throttleActionCacheCheck;

@Option(
name = "check_fileset_dependencies_recursively",
defaultValue = "true",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,10 @@ void prepareForExecution(
freeDiscoveredInputsAfterExecution =
!trackIncrementalState && options.getOptions(CoreOptions.class).actionListeners.isEmpty();

this.cacheHitSemaphore = new Semaphore(ResourceUsage.getAvailableProcessors());
this.cacheHitSemaphore =
options.getOptions(CoreOptions.class).throttleActionCacheCheck
? new Semaphore(ResourceUsage.getAvailableProcessors())
: null;

this.actionExecutionSemaphore =
buildRequestOptions.useSemaphoreForJobs ? new Semaphore(buildRequestOptions.jobs) : null;
Expand Down
Loading