cockroachdb / cockroachdb/cockroach
crosscluster/logical: memory monitor txn LDR buffers
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
The d[ependency resolver client ](https://github.com/cockroachdb/cockroach/pull/170506)and the txn applier (one [here](https://github.com/msbutler/cockroach/blob/butler-ldr-buffers/pkg/crosscluster/logical/txnapply/txn_applier.go#L404), another [here](https://github.com/msbutler/cockroach/blob/butler-ldr-buffers/pkg/crosscluster/logical/txnapply/txn_applier.go#L122)) have a few unbounded buffers. Given that the merge feed sends the distributed applier a global ordering of all transactions, i dont think these buffers could OOM. But maybe i'm wrong and we should build in some sort of safe guard here. Jeff had two ideas:
> We attempt to limit the number of scheduled transactions in order to limit the size of buffers in the appliers.
We may be able to get rid of this (nudge) buffer(s) entirely. I think if we had a goroutine own the scoreboard we could have it select from and push into channels in a single select and avoid the need for buffering these events.
Jira issue: CRDB-64108
Epic CRDB-65552
Contributor guide
Assessment
This issue has not been assessed yet.