Skip to content

kvstorage: fix CreateUninitializedReplica comment#150189

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
pav-kv:fix-obsolete-comment
Jul 16, 2025
Merged

kvstorage: fix CreateUninitializedReplica comment#150189
craig[bot] merged 1 commit intocockroachdb:masterfrom
pav-kv:fix-obsolete-comment

Conversation

@pav-kv
Copy link
Copy Markdown
Collaborator

@pav-kv pav-kv commented Jul 14, 2025

The scenario described in the comment was possible before it became an invariant that all replicas have a RaftReplicaID in storage. Since we completed a migration [#95513] which established this invariant, we can remove this comment.

Historical context: https://github.com/cockroachdb/cockroach/pull/75761/files#diff-208036c53fab5274d107185f7b974421738b6cd54b849000a60656c764ba2b08R224-R272

Epic: none
Release note: none

@pav-kv pav-kv requested review from arulajmani and tbg July 14, 2025 21:27
@pav-kv pav-kv requested a review from a team as a code owner July 14, 2025 21:27
@blathers-crl
Copy link
Copy Markdown

blathers-crl bot commented Jul 14, 2025

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
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Collaborator

@arulajmani arulajmani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @tbg)


pkg/kv/kvserver/kvstorage/replica_state.go line 140 at r1 (raw file):

	//
	// Before this point, raft and state machine state of this replica are
	// non-existing. The only RangeID-specific key that can be present is the

nit: "non-existant"

The scenario described in the comment was possible before it became an
invariant that all replicas have a RaftReplicaID in storage. Since we
completed a migration which established this invariant, we can remove
this comment.

Epic: none
Release note: none
@pav-kv pav-kv force-pushed the fix-obsolete-comment branch from 91b87b8 to f66721f Compare July 15, 2025 18:17
@pav-kv
Copy link
Copy Markdown
Collaborator Author

pav-kv commented Jul 15, 2025

TFTR!

bors r=arulajmani

Copy link
Copy Markdown
Collaborator Author

@pav-kv pav-kv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @arulajmani and @tbg)


pkg/kv/kvserver/kvstorage/replica_state.go line 140 at r1 (raw file):

Previously, arulajmani (Arul Ajmani) wrote…

nit: "non-existant"

Done.

"non-existent", according to https://en.wiktionary.org/wiki/existant 😆

@pav-kv
Copy link
Copy Markdown
Collaborator Author

pav-kv commented Jul 16, 2025

bors retry

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Jul 16, 2025

@craig craig bot merged commit e4b2d35 into cockroachdb:master Jul 16, 2025
22 checks passed
@pav-kv pav-kv deleted the fix-obsolete-comment branch July 16, 2025 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants