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

Simplified quick_abort_pct code and improved its docs #1921

Closed
Closed
Show file tree
Hide file tree
Changes from 5 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
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,7 @@ Thank you!
Sergey Merzlikin <[email protected]>
Sergio Durigan Junior <[email protected]>
Sergio Rabellino <[email protected]>
Shailesh Vashishth <[email protected]>
Copy link
Contributor

Choose a reason for hiding this comment

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

This entry is just fine if you like it, but if you prefer to use some other email address, please note that you can adjust this entry accordingly. Our automation is "smart" enough to allow you to pick the email address you prefer...

Copy link
Contributor Author

@vshailesh vshailesh Nov 22, 2024

Choose a reason for hiding this comment

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

I tried updating to another email, and I am not able to pick another email id. How do I do that?
The source maintenance check failed

Copy link
Contributor

Choose a reason for hiding this comment

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

I am working on fixing this. Please wait.

Copy link
Contributor

Choose a reason for hiding this comment

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

@vshailesh, almost done. The current PR branch passes local source maintenance tests, but fails the same tests on GitHub Actions. I know why, but I cannot fix that problem quickly.

For now, would you mind changing/setting your GitHub account email to the one you want to see in CONTRIBUTORS (hopefully, that is the same address that this PR branch has listed in CONTRIBUTORS now)? I hope (but cannot easily test) that such a GitHub account update will change the author of the merge commit that GitHub Actions test, resolving the last remaining problem.

We should be handling your use case better, but that will take time to fix... AFAIK, we have not seen it before.

Shigechika Aikawa <[email protected]>
Shmaya Frankel <[email protected]>
Silamael <[email protected]>
Expand Down
8 changes: 1 addition & 7 deletions src/store_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -984,13 +984,7 @@ CheckQuickAbortIsReasonable(StoreEntry * entry)
return true;
}

// XXX: This is absurd! TODO: For positives, "a/(b/c) > d" is "a*c > b*d".
if (expectlen < 100) {
debugs(90, 3, "quick-abort? NO avoid FPE");
return false;
}

if ((curlen / (expectlen / 100)) > (Config.quickAbort.pct)) {
if (curlen > expectlen*(Config.quickAbort.pct/100.0)) {
vshailesh marked this conversation as resolved.
Show resolved Hide resolved
debugs(90, 3, "quick-abort? NO past point of no return");
return false;
}
Expand Down