-
Notifications
You must be signed in to change notification settings - Fork 4k
Open
Labels
A-cdcChange Data CaptureChange Data CaptureC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.O-supportWould prevent or help troubleshoot a customer escalation - bugs, missing observability/tooling, docsWould prevent or help troubleshoot a customer escalation - bugs, missing observability/tooling, docsT-cdcbranch-masterFailures and bugs on the master branch.Failures and bugs on the master branch.branch-release-24.1Used to mark GA and release blockers, technical advisories, and bugs for 24.1Used to mark GA and release blockers, technical advisories, and bugs for 24.1branch-release-24.3Used to mark GA and release blockers, technical advisories, and bugs for 24.3Used to mark GA and release blockers, technical advisories, and bugs for 24.3branch-release-25.1branch-release-25.2branch-release-25.3Used to mark GA and release blockers and technical advisories for 25.3Used to mark GA and release blockers and technical advisories for 25.3branch-release-25.4Used to mark GA and release blockers and technical advisories for 25.4Used to mark GA and release blockers and technical advisories for 25.4
Description
Changefeeds watching a subset of a table's column families will leak the Alloc for events coming from unwatched families due to a missing Release() call in an early return here and here. This has likely existed since column family support was introduced.
Found while investigating this support issue.
Minimal repro:
create table cftest (
id int primary key,
pstr string,
data string,
FAMILY prim (id, pstr),
FAMILY df (data)
);
insert into cftest (id, pstr, data)
select
g,
'hello-' || g::string,
REPEAT('SQL', 5000)
from generate_series(1, 10000) as g;
set cluster setting changefeed.memory.per_changefeed_limit = '1MiB'; -- set this low to make it easier to hit the limit
CREATE CHANGEFEED FOR TABLE cftest family prim INTO 'null:' with initial_scan='no', diff;
-- diff is not required to break it, but also makes it easier to hit the limt, as prev values' allocs are also leaked
update cftest set data = REPEAT('SQL2', 5000) where true;
-> observe sql.mem.bulk.current maxing at 1MiB (configured max), and changefeed.max_behind_nanos to start rising

Jira issue: CRDB-55112
Metadata
Metadata
Assignees
Labels
A-cdcChange Data CaptureChange Data CaptureC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.O-supportWould prevent or help troubleshoot a customer escalation - bugs, missing observability/tooling, docsWould prevent or help troubleshoot a customer escalation - bugs, missing observability/tooling, docsT-cdcbranch-masterFailures and bugs on the master branch.Failures and bugs on the master branch.branch-release-24.1Used to mark GA and release blockers, technical advisories, and bugs for 24.1Used to mark GA and release blockers, technical advisories, and bugs for 24.1branch-release-24.3Used to mark GA and release blockers, technical advisories, and bugs for 24.3Used to mark GA and release blockers, technical advisories, and bugs for 24.3branch-release-25.1branch-release-25.2branch-release-25.3Used to mark GA and release blockers and technical advisories for 25.3Used to mark GA and release blockers and technical advisories for 25.3branch-release-25.4Used to mark GA and release blockers and technical advisories for 25.4Used to mark GA and release blockers and technical advisories for 25.4