Skip to content

Commit

Permalink
kvserver: implement closed ts side-transport publisher
Browse files Browse the repository at this point in the history
The side-transport is a component running on each node and periodically
publishing closed timestamps on ranges with the lease on the respective
node. This complements the closing of timestamps through Raft commands
such that inactive ranges still have their timestamp advanced.

This commit introduces only the publishing side (the consumer is coming
separately) - the guy opening streaming connections to all other nodes
with follower replicas for some ranges with local leases and
periodically publishing closed timestamp updates on a bunch of ranges at
once.

Care has been taken to make the communication protocol efficient. Each
stream is stateful and the information in every message is nicely
compressed.

See [the RFC](#56675) for details.

Release justifaction: Needed for global tables.
Release note: None
  • Loading branch information
andreimatei committed Feb 25, 2021
1 parent 8392017 commit 47fbe89
Show file tree
Hide file tree
Showing 15 changed files with 2,321 additions and 337 deletions.
14 changes: 14 additions & 0 deletions pkg/kv/kvserver/closedts/ctpb/service.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Copyright 2021 The Cockroach Authors.
//
// Use of this software is governed by the Business Source License
// included in the file licenses/BSL.txt.
//
// As of the Change Date specified in that file, in accordance with
// the Business Source License, use of this software will be governed
// by the Apache License, Version 2.0, included in the file
// licenses/APL.txt.

package ctpb

// UpdateSequenceNumber identifies a ClosedTimestampUpdate.
type UpdateSequenceNumber int64
Loading

0 comments on commit 47fbe89

Please sign in to comment.