-
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
server: initialize DBContext with correct instance ID #97467
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.
wow nice catch
bors r=knz |
|
Is it possible to add an assert or test to prevent future regressions? |
bors cancel |
Canceled. |
@j82w Good call. I'll see what happens if I add a few assertion failures in places where we expect to have a sql instance ID. |
Before this change the DBContext in a tenant would always have a zero'd SQLInstanceID. Note that for SQL pods not co-located on an KV-node, OptionalNodeID() should still return 0 and anything that requires a NodeID rather than an InstanceID _should_ be using that method. Informs: #96353 Epic: none Release note: None
part of #96353 Epic: None Release note: None
9a21db9
to
e49d44f
Compare
bors r=knz |
Build succeeded: |
Before this change the DBContext in a tenant would always have a zero'd SQLInstanceID.
Note that for SQL pods not co-located on an KV-node, OptionalNodeID() should still return 0 and anything that requires a NodeID rather than an InstanceID should be using that method.
Informs: #96353
Epic: none
Release note: None