-
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.
kvcoord: Eliminate 1 Go routine from MuxRangeFeed
Prior to this PR, the server side `MuxRangeFeed` implementation spawned a separate Go routine executing single RangeFeed for each incoming request. This is wasteful and unnecessary. Instead of blocking, and waiting for a single RangeFeed to complete, have rangefeed related functions return a promise to return a `*kvpb.Error` once rangefeed completes (`future.Future[*kvpb.Error]`). Prior to this change MuxRangeFeed would spin up 4 Go routines per range. With this PR, the number is down to 3. This improvement is particularly important when executing rangefeed against large tables (10s-100s of thousands of ranges). Informs #96395 Epic: None Release note (enterprise change): Changefeeds running with `changefeed.mux_rangefeed.enabled` setting set to true are more efficient, particularly when executing against large tables.
- Loading branch information
Yevgeniy Miretskiy
committed
Mar 14, 2023
1 parent
62a7258
commit c3bac9d
Showing
13 changed files
with
262 additions
and
198 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
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.