-
Notifications
You must be signed in to change notification settings - Fork 3.9k
admission: ensure GetPebbleMetrics is not called after StoreGrantCoor… #146301
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
Conversation
It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR? 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
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.
Reviewable status:
complete! 1 of 0 LGTMs obtained
pkg/util/admission/grant_coordinator.go
line 284 at r1 (raw file):
// permitted. sgc.closeCh <- struct{}{} close(sgc.closeCh)
[nit] do we still need to close? Feels strange to do both
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.
TFTR!
Reviewable status:
complete! 1 of 0 LGTMs obtained (waiting on @RaduBerinde)
pkg/util/admission/grant_coordinator.go
line 284 at r1 (raw file):
Previously, RaduBerinde wrote…
[nit] do we still need to close? Feels strange to do both
Figured it is the clean thing to do. If somehow StoreGrantCoordinators.close
gets called twice due to a bug, sending on a closed channel will panic. Of course, there are other ways to accomplish this. I don't have a strong opinion.
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.
Reviewable status:
complete! 1 of 0 LGTMs obtained (waiting on @sumeerbhola)
pkg/util/admission/grant_coordinator.go
line 284 at r1 (raw file):
Previously, sumeerbhola wrote…
Figured it is the clean thing to do. If somehow
StoreGrantCoordinators.close
gets called twice due to a bug, sending on a closed channel will panic. Of course, there are other ways to accomplish this. I don't have a strong opinion.
Good point. Maybe add a comment above close.
…dinators.close Fixes cockroachdb#140454, cockroachdb#144172 Epic: none Release note: None
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.
Reviewable status:
complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @RaduBerinde)
pkg/util/admission/grant_coordinator.go
line 284 at r1 (raw file):
Previously, RaduBerinde wrote…
Good point. Maybe add a comment above close.
Done
bors r=RaduBerinde |
…dinators.close
Fixes #140454, #144172
Epic: none
Release note: None