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

Do not use cache after the failure cap is reached #1494

Merged
merged 2 commits into from
Dec 19, 2023

Conversation

JakeSiFive
Copy link
Contributor

This change just makes it so that no attempt is made whatsoever after the failure cap is reached, this includes add.

As a toss in I also fixed add not using the config.

Copy link
Contributor

@colinschmidt colinschmidt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

FindJobResponse Cache::read(const FindJobRequest &find_request) {
if (misses_from_failure > timeout_config.max_misses_from_failure) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the two new guards supposed to also include miss_on_failure? I guess if miss_on_failure is not set we wouldn't expect misses_from_failure to be non-zero and therefore these guards should never trigger, so its just a style question not a functionality quesiton.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah its never going to be reached. We only use miss_on_failure to determine if the miss is a failure or not

@JakeSiFive JakeSiFive merged commit 9f596a5 into master Dec 19, 2023
12 checks passed
@JakeSiFive JakeSiFive deleted the do_not_use_cache_after_fail_cap branch December 19, 2023 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants