-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kvserver: disconnect rangefeeds on
AddSSTable
This patch disconnects rangefeeds on `AddSSTable` application with `REASON_ADDSSTABLE`. This allows consumers to reconnect and run a catchup scan to see the new writes. The rangefeed is only disconnected when `WriteAtRequestTimestamp` is enabled for the `AddSSTable` request. Otherwise the SSTable may write below the closed timestamp, and so a catchup scan may not see the changes anyway. Since we have to disconnect the rangefeed even for `IngestAsWrites`, which does not produce a replicated `AddSSTable` result (there is no SST to link), a new field `ReplicatedEvalResult.DisconnectRangeFeed` is added as a general mechanism to disconnect the rangefeed. This is not used elsewhere, to retain backwards compatibility with 21.2 followers, but `WriteAtRequestTimestamp` requires a 22.1 `MVCCAddSSTable` version gate and can therefore safely rely on this field. Release note: None
- Loading branch information
1 parent
ebd9bed
commit 6f2891d
Showing
11 changed files
with
570 additions
and
302 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
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.