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

kvstorage: number stores separately from node IDs #102968

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

knz
Copy link
Contributor

@knz knz commented May 9, 2023

Informs #102967.

We recently discovered that a lot of our observability surfaces have created confusion -- or rather, a mistaken assumption -- that store IDs and node IDs are interchangeable.

As we start to see more and more deployments with multiple stores per node, this assumption gets invalidated more and more often, with gross correctness results in interpreting metrics and other observability data.

To improve this situation, this commit changes the store numbering to start at 123. In addition, it increases the stride between store IDs to 3 to ensure that the difference between node ID and store ID doesn't appear to be simple in the common case.

Release note (backward-incompatible change): CockroachDB now uses a different mechanism to number stores, separate from the allocation of node IDs. While the two concepts have historically always be different, it is possible that some audiences were confused and mistakenly assumed they were interchangeable. Any previous automation built on top of that assumption should be adjusted to relate a store ID back to the node ID using the node/store metatadata.

We recently discovered that a lot of our observability surfaces have
created confusion -- or rather, a mistaken assumption -- that store
IDs and node IDs are interchangeable.

As we start to see more and more deployments with multiple stores per
node, this assumption gets invalidated more and more often, with gross
correctness results in interpreting metrics and other observability
data.

To improve this situation, this commit changes the store numbering
to start at 123. In addition, it increases the stride between store
IDs to 3 to ensure that the difference between node ID and store ID
doesn't appear to be simple in the common case.

Release note (backward-incompatible change): CockroachDB now uses a
different mechanism to number stores, separate from the allocation of
node IDs. While the two concepts have historically always be
different, it is possible that some audiences were confused and
mistakenly assumed they were interchangeable. Any previous automation
built on top of that assumption should be adjusted to relate a store
ID back to the node ID using the node/store metatadata.
@knz knz requested review from tbg and abarganier May 9, 2023 18:02
@blathers-crl
Copy link

blathers-crl bot commented May 9, 2023

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.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@tbg tbg removed their request for review May 11, 2023 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants