-
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.
68084: colfetcher: limit batches by memory footprint r=yuzefovich a=yuzefovich Previously, in the cFetcher we were performing the memory accounting for the output batch at a batch granularity. In some cases this led to batches that significantly exceed the target memory limit. One notable example is the case when we have very wide rows (say large blob column) and an estimated row count - we would allocate the batch based on the estimated row count. Later on we would not realize that each row is large. This commit refactors the memory accounting to be at a row granularity. Whenever a row is finished, we perform the accounting for the last row set. We have to be a bit careful for this accounting to not have significant performance hit, so a new `Allocator.AccountForSet` method is introduced. It assumes that all fixed-length vectors have already been accounted for, handles bytes-like vectors in a special manner (with the help of the caller), and updates the account if there were any decimals or datum-backed values only for the last row. Addresses: #68008. Release note: None 68087: changefeedccl: Use separate budgets for sink and kvfeed. r=miretskiy a=miretskiy Use separate memory budget accounting for memory used in kvfeed and the memory used by the sink for in-transit messages. We need to use separate budgets because the rate of incoming messages might be very different from the rate of egress messages. As a result, it's possible that we can re-fill a kvfeed buffer faster than we can drain it; and as a result, the sink will not be able to request additional memory for its inflight messages. The follow on PRs will change the sink to support pushback mode, so the above would not be necessary. Release Notes: None Co-authored-by: Yahor Yuzefovich <[email protected]> Co-authored-by: Yevgeniy Miretskiy <[email protected]>
- Loading branch information
Showing
15 changed files
with
238 additions
and
79 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
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.