cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
30.16k stars 3.82k forks source link

kvserver/rangefeed: memory accounting is missing for catch up scans #129049

Open wenyihu6 opened 3 months ago

wenyihu6 commented 3 months ago

Describe the problem

Previously, we introduced memory accounting to rangefeed. However, catch up scans are not subject to memory accounting afaict https://github.com/cockroachdb/cockroach/blob/2f8519c1ae5020614ee1616c829e1d5b3702f942/pkg/kv/kvserver/rangefeed/catchup_scan.go#L143. We should also consider using sync.Pool (like real live events memory accounting) to reduce allocations if possible. We didn't fully address the issue described in https://github.com/cockroachdb/cockroach/issues/73616 and https://github.com/cockroachdb/cockroach/issues/69596.

Jira issue: CRDB-41355

Epic CRDB-39959

blathers-crl[bot] commented 3 months ago

Hi @wenyihu6, please add branch-* labels to identify which branch(es) this C-bug affects.

:owl: Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.