-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
changefeedccl: refactor kvfeed startup in changeaggregator processor #109345
Conversation
It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR? 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
dedeec0
to
f0fc374
Compare
This change cleans up the code used to start up the kv feed in change aggregator processors. This change removes uncessessary code, adds a better API, and makes code easier to reason about. Informs: cockroachdb#96953 Release note: None Epic: None
f0fc374
to
98c762d
Compare
ca.eventProducer, err = ca.startKVFeed(ctx, spans, kvFeedHighWater, needsInitialScan, feed) | ||
// TODO(yevgeniy): Introduce separate changefeed monitor that's a parent | ||
// for all changefeeds to control memory allocated to all changefeeds. | ||
pool := ca.flowCtx.Cfg.BackfillerMonitor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will probably add our own monitor in a subsequent PR.
// but only the first one is ever used. | ||
ca.errCh = make(chan error, 2) | ||
ca.kvFeedDoneCh = make(chan struct{}) | ||
errCh := make(chan error, 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we sure this is safe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see; yes it is.
bors r=miretskiy |
Build succeeded: |
changefeedccl: refactor kvfeed startup in changeaggregator processor
This change cleans up the code used to start up the kv feed
in change aggregator processors. This change removes uncessessary code,
adds a better API, and makes code easier to reason about.
Informs: #96953
Release note: None
Epic: None