-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
multitenant: don't panic if reader doesn't exist yet #99318
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.
LGTM
This looks fine, but I am worried that these functions are diverging. They are all pretty much just checking a bool(s), but have slight differences already. |
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.
Should we add a comment inline as well, in case future readers wonder why this function doesn't panic like the others?
Maybe update commit message and PR description to replace "in memory tenants" by "shared process tenant servers". |
While shared-process tenant servers are not likely to make requests before the capability reader exists, the limiter factory looks up the relevant tenant ID from the start key of the range descriptor and it isn't unlikely that we'll see requests against tenant ranges before we have a capability reader available. Epic: none Release note: None Release justification: Low risk fix to avoid panics in tests.
Comments and commit message updated. Will merge once CI is green.
I kinda wonder if what we want here is a |
Test failure is slow quiesce. bors r=knz,ajstorm,arulajmani |
Build succeeded: |
While shared-process tenant servers are not likely to make requests
before the capability reader exists, the limiter factory looks up the
relevant tenant ID from the start key of the range descriptor and it
isn't unlikely that we'll see requests against tenant ranges before we
have a capability reader available.
Epic: none
Release note: None
Release justification: Low risk fix to avoid panics in tests.