Skip to content

kv: give Transport a haircut#28855

Merged
craig[bot] merged 5 commits intocockroachdb:masterfrom
nvb:nvanbenschoten/gutTransport
Aug 21, 2018
Merged

kv: give Transport a haircut#28855
craig[bot] merged 5 commits intocockroachdb:masterfrom
nvb:nvanbenschoten/gutTransport

Conversation

@nvb
Copy link
Copy Markdown
Contributor

@nvb nvb commented Aug 20, 2018

This includes 5 refactors to kv.Transport that will make it a lot easier to extend for RangeFeed changes. They should also provide modest perf benefits due to reduced locking and allocation avoidance. The changes include:

  • adding BatchRequest to Transport.SendNext instead of capturing in Transport
  • ripping out Transport.GetPending and batchClient.pending
  • ripping out clientPendingMu from grpcTransport
  • removing nodeID from batchClient
  • ripping out Transport.Close

No need to review yet. Pushing for CI.

@nvb nvb requested review from a team August 20, 2018 19:13
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@nvb nvb force-pushed the nvanbenschoten/gutTransport branch from dce9daf to 6dcb123 Compare August 20, 2018 19:41
Copy link
Copy Markdown
Member

@tbg tbg left a comment

Choose a reason for hiding this comment

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

:lgtm_strong:

Reviewed 9 of 9 files at r1, 5 of 5 files at r2, 1 of 1 files at r3, 2 of 2 files at r4, 5 of 5 files at r5.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained

nvb added 5 commits August 21, 2018 16:12
These aren't needed anymore.

Release note: None
This no longer needs to be thread-safe.

Release note: None
This state is already in ReplicaDescriptor.

Release note: None
This was not needed anymore. This should provide a small
but real perf win because we can avoid the context.WithCancel
call for every RPC.

Release note: None
@nvb nvb force-pushed the nvanbenschoten/gutTransport branch from c85ce0f to e9fd30c Compare August 21, 2018 20:17
@nvb
Copy link
Copy Markdown
Contributor Author

nvb commented Aug 21, 2018

bors r+

craig bot pushed a commit that referenced this pull request Aug 21, 2018
28855: kv: give Transport a haircut r=nvanbenschoten a=nvanbenschoten

This includes 5 refactors to `kv.Transport` that will make it a lot easier to extend for RangeFeed changes. They should also provide modest perf benefits due to reduced locking and allocation avoidance. The changes include:
- adding `BatchRequest` to `Transport.SendNext` instead of capturing in `Transport`
- ripping out `Transport.GetPending` and `batchClient.pending`
- ripping out `clientPendingMu` from `grpcTransport`
- removing `nodeID` from `batchClient`
- ripping out `Transport.Close`

No need to review yet. Pushing for CI.

Co-authored-by: Nathan VanBenschoten <nvanbenschoten@gmail.com>
@craig
Copy link
Copy Markdown
Contributor

craig bot commented Aug 21, 2018

Build succeeded

@craig craig bot merged commit e9fd30c into cockroachdb:master Aug 21, 2018
craig bot pushed a commit that referenced this pull request Sep 4, 2018
29500: release-2.1: backport 7 rangefeed PRs r=nvanbenschoten a=nvanbenschoten

Backport:
  * 5/5 commits from "kv: give Transport a haircut" (#28855)
  * 1/1 commits from "engine: use Txn.Timestamp instead of OrigTimestamp for LogLogicalOp" (#28970)
  * 1/1 commits from "rangefeed: add release valve to logical op consumption" (#29076)
  * 3/3 commits from "kv: teach DistSender about RangeFeeds, use for changefeeds" (#28912)
  * 1/1 commits from "rangefeed: small perf-related changes" (#29134)
  * 2/2 commits from "kv: truncate RangeFeed span to range descriptor " (#29219)
  * 2/2 commits from "storage: hook closed timestamps into rangefeed" (#28974)

Please see individual PRs for details.

All cherry-picks were clean.

/cc @cockroachdb/release


Co-authored-by: Nathan VanBenschoten <nvanbenschoten@gmail.com>
@nvb nvb deleted the nvanbenschoten/gutTransport branch September 11, 2018 15:41
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