changefeedccl: make a changefeed setting for sink IO workers
We currently have a cluster setting changefeed.sink_io_workers for configuring the number of workers in the parallel IO instance.
We should have a changefeed setting to allow this to be configured on a per-feed basis, and use the min of the two values if they're different.
Jira issue: CRDB-54990
cc @cockroachdb/cdc
Hey @KeithCh,
If this is still relevant and not super urgent, I'd like to give this a shot. I haven't contributed to cockroach previously and this issue seems like a nice way to dive into the code.
The approach I have in mind would be to allow setting the option when creating a changefeed e.g.
CREATE CHANGEFEED FOR TABLE ...
WITH num_sink_workers = ...
and making the value available through the StatementOptions.
Finally, the StatementOptions could be passed to the numSinkIOWorkers() function to determine whether to use a specifically set number of workers or the cluster setting.
What do you think?
Hey @fabschn, Keith is on vacation right now, but yeah feel free to take a look at this one. Your approach sounds good to me.
Thanks Miles for getting back to me while Keith is on vacation. I'll dive a bit deeper into it and hope to submit a PR during the upcoming week - or else I'll let you know if I encounter any blockers with the approach above.
I just opened a PR for this - let me know what you think.
For transparency: since the changes are contained to the changefeedccl package, I only ran the tests for this package ./dev test changefeedccl -v.
Additionally, I ran the short version of the linter: ./dev lint --short
Let me know if I should run any additional checks locally before triggering the CI jobs.
I'd like to work on this