forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
changefeedccl: limit in-memory rowfetcher cache
We generate a row.Fetcher for each new version of a watched table, and cache it in-memory. This is technically an unbounded memory usage and thus could cause an OOM, although in practice you won't hit that unless you are Schema Changes Georg, the hypothetical outlier who makes thousands of schema changes a second. To support Schema Changes Georg, this PR bounds the size of the cache and evicts the oldest record. There's smarter stuff we could do (per an existing TODO) to eagerly evict records using resolved timestamps, but that's an optimization only a small subset of hypothetical Georgs would care about (those running single changefeeds on many tables, all with many rapid schema changes) so I doubt we'll want to bother. Release note: None
- Loading branch information
Showing
2 changed files
with
19 additions
and
9 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