-
Notifications
You must be signed in to change notification settings - Fork 264
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
fix: short-term fix for issue #322 #333
Conversation
Your Render PR Server URL is https://chproxy-pr-333.onrender.com. Follow its progress at https://dashboard.render.com/static/srv-ch6dk31jvhthotds3bb0. |
const tmpDir = "/tmp" | ||
const ( | ||
tmpDir = "/tmp" // tmpDir temporary path to store ongoing queries results | ||
defaultHostCounter = uint32((1 << 32) - 1) // default value for Host.Counter; Short-term fix issue #322 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
be-careful, with such a big value you'll likely overflow.
You should put 1 << 31
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll test 1<<31
However, when it's 1<<32 s.host.inc()
will be called
Line 100 in 5872a42
if err := s.incQueued(); err != nil { |
as result value will be 0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, and if 2 queries happens at the same time the value will be 2^32 + 1 (i.e overflow)
After internal discussion closing this PR. I'll reopen another one with short-term fix |
Description
Max value for Host.Counter. Short-term fix for issue #322
Pull request type
Please check the type of change your PR introduces:
Checklist
Does this introduce a breaking change?
Further comments