-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
c2c: add new streaming client and value generator for span config rep…
…lication This patch adds a new implementation of the streamclient.Client interface which replicates span config updates for the replicating app tenant. With this change, a call to spanConfigClient.SetupSpanConfigsStream() will return a new spanConfigSubscription which the client can use to listen for span config updates. Internally, this subscription spins up the new spanConfigEventStream value generator which listens to updates on the system span_configuration table using a rangefeedcache. Unlike the original eventStream which manages a rangefeed, the spanConfigEventStream uses a rangefeedcache wrapper as it provides nicer ordering guarantees on when it emits updates. Specifically, the rangefeed cache buffers updates emitted from the underlying rangefeed and only flushes updates less than t1 once the whole span has been checkpointed to t1. In other words, the rangefeed cache gaurantees that once it flushes updates less than t1, it will not flush any more _new_ updates less than t1. The rangefeed cache also flushes updates in sorted timestamp order. These properties will simplify the ingestion of these span config updates signficantly. To understand why, consider that span config updates _must_ be ingested in the same order that they were applied. Since the rangefeed cache will emit all new updates in order, the ingestion side doesn't need to buffer updates or keep track of checkpoints. Informs #106823 Release note: None
- Loading branch information
Showing
26 changed files
with
1,012 additions
and
352 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,5 +16,6 @@ go_library( | |
"//pkg/repstream/streampb", | ||
"//pkg/roachpb", | ||
"//pkg/settings", | ||
"//pkg/util/hlc", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.