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

kvclient: remove RPCContext from DistSender #116644

Merged

Conversation

andrewbaptist
Copy link
Collaborator

RPCContext is unnecessary in DistSender. The only two things that are needed are the LatencyFunc, which is extracted from the RemoteClocks, and the Stopper which should have been passed in directly. This change makes DistSender a tiny bit more easily testable.

Epic: none

Release note: None

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@andrewbaptist andrewbaptist force-pushed the 2023-12-17-remove-dist-sender-clock branch from 1cc3c60 to dd4ef8a Compare December 18, 2023 18:46
@andrewbaptist andrewbaptist marked this pull request as ready for review December 18, 2023 18:49
@andrewbaptist andrewbaptist requested a review from a team as a code owner December 18, 2023 18:49
@andrewbaptist andrewbaptist requested review from a team December 18, 2023 18:49
@andrewbaptist andrewbaptist requested review from a team as code owners December 18, 2023 18:49
@andrewbaptist andrewbaptist requested review from dhartunian and yuzefovich and removed request for a team December 18, 2023 18:49
Copy link
Member

@yuzefovich yuzefovich 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 12 of 12 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @andrewbaptist, @arulajmani, @dhartunian, and @nvanbenschoten)


pkg/kv/kvclient/kvcoord/dist_sender.go line 668 at r1 (raw file):

		healthFunc:    cfg.HealthFunc,
		latencyFunc:   cfg.LatencyFunc,
		stopper:       cfg.Stopper,

nit: maybe move stopper to be after st?


pkg/kv/kvserver/store_test.go line 259 at r1 (raw file):

		Clock:      cfg.Clock,
		NodeDescs:  mockNodeStore{desc: nodeDesc},

nit: stray new line.

@andrewbaptist andrewbaptist force-pushed the 2023-12-17-remove-dist-sender-clock branch from dd4ef8a to 692d4f8 Compare December 20, 2023 20:37
@andrewbaptist
Copy link
Collaborator Author

bors r=yuzefovich

TFTR! (and the really quick turnaround)

RPCContext is unnecessary in DistSender. The only two things that are
needed are the LatencyFunc, which is extracted from the RemoteClocks,
and the Stopper which should have been passed in directly. This change
makes DistSender a tiny bit more easily testable.

Epic: none

Release note: None
@andrewbaptist andrewbaptist force-pushed the 2023-12-17-remove-dist-sender-clock branch from 692d4f8 to de430df Compare December 20, 2023 21:01
@craig
Copy link
Contributor

craig bot commented Dec 20, 2023

Canceled.

@andrewbaptist
Copy link
Collaborator Author

bors retry

Fixed the incorrect spacing from the merge conflict.

@craig
Copy link
Contributor

craig bot commented Dec 20, 2023

Build succeeded:

@craig craig bot merged commit 611607c into cockroachdb:master Dec 20, 2023
6 of 9 checks passed
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.

3 participants