Skip to content

kvserver: remove unused snapshot fields#99884

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
andrewbaptist:2023-03-28-cleanup-snapshot
Jan 31, 2024
Merged

kvserver: remove unused snapshot fields#99884
craig[bot] merged 1 commit intocockroachdb:masterfrom
andrewbaptist:2023-03-28-cleanup-snapshot

Conversation

@andrewbaptist
Copy link
Copy Markdown

@andrewbaptist andrewbaptist commented Mar 28, 2023

This commit removes a number of unused fields in snapshot messages.

Release note: None
Epic: none

@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@andrewbaptist andrewbaptist force-pushed the 2023-03-28-cleanup-snapshot branch 4 times, most recently from ab3dc15 to 8f518c1 Compare April 3, 2023 20:26
@andrewbaptist andrewbaptist force-pushed the 2023-03-28-cleanup-snapshot branch 4 times, most recently from 90351c8 to 2a5e5c5 Compare April 28, 2023 17:44
@andrewbaptist
Copy link
Copy Markdown
Author

This can be merged into 24.1 if #102629 goes into 23.2. That patch stops reading the field everywhere, but this patch actually removes the fields.

@andrewbaptist andrewbaptist force-pushed the 2023-03-28-cleanup-snapshot branch 2 times, most recently from fd58808 to a25f360 Compare April 28, 2023 19:56
@andrewbaptist andrewbaptist force-pushed the 2023-03-28-cleanup-snapshot branch from a25f360 to e461583 Compare December 18, 2023 21:59
@andrewbaptist andrewbaptist force-pushed the 2023-03-28-cleanup-snapshot branch from e461583 to 6bcebd2 Compare January 26, 2024 01:40
@andrewbaptist andrewbaptist changed the title kvserver: Remove unnecessary protobuf fields kvserver: remove unused snapshot fields Jan 26, 2024
@andrewbaptist andrewbaptist marked this pull request as ready for review January 26, 2024 01:41
@andrewbaptist andrewbaptist requested a review from a team as a code owner January 26, 2024 01:41
@andrewbaptist andrewbaptist requested review from a team and kvoli January 26, 2024 01:41
@pav-kv
Copy link
Copy Markdown
Collaborator

pav-kv commented Jan 26, 2024

This can be merged into 24.1 if #102629 goes into 23.2. That patch stops reading the field everywhere, but this patch actually removes the fields.

Does this presume that upgrades from 23.2 to 24.1 will happen from a 23.2 minor version that contains this patch? That won't always be true, will it?

Upd: Ah, realized the date of that message :) The patch actually made it to .0, so this should be good.

@andrewbaptist
Copy link
Copy Markdown
Author

andrewbaptist commented Jan 26, 2024 via email

@andrewbaptist andrewbaptist force-pushed the 2023-03-28-cleanup-snapshot branch 2 times, most recently from 714cd36 to 7eb40c9 Compare January 26, 2024 16:28
Copy link
Copy Markdown
Contributor

@kvoli kvoli 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 6 of 7 files at r1, 16 of 16 files at r2, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @andrewbaptist)


pkg/kv/kvserver/store_snapshot.go line 1394 at r2 (raw file):

		} else if header.SenderQueueName == kvserverpb.SnapshotRequest_OTHER {
			s.metrics.RangeSnapshotRebalancingRcvdBytes.Inc(inc)
		} else { // replicate queue does both types, so need to split

nit: move the comment below and capitalize.


pkg/kv/kvserver/client_merge_test.go line 3726 at r1 (raw file):

		sstNames []string,
	) error {
		// Only verify snapshots of type VIA_SNAPSHOT_QUEUE and on the range under

nit: should the VIA_SNAPSHOT_QUEUE part of this comment be removed?

This commit removes a number of unused fields in snapshot messages.

Additionally this removes the `unknown` snapshot metric as that is
always 0 today as there is no longer any way for it to be populated.

Release note: None
Epic: none
@andrewbaptist andrewbaptist force-pushed the 2023-03-28-cleanup-snapshot branch from 7eb40c9 to aa6d150 Compare January 30, 2024 20:47
@andrewbaptist
Copy link
Copy Markdown
Author

bors r=kvoli

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Jan 31, 2024

Build succeeded:

@craig craig bot merged commit 9a8037a into cockroachdb:master Jan 31, 2024
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.

4 participants