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.1k stars 3.81k forks source link

changefeedccl: improve planning heuristics #113898

Open jayshrivastava opened 1 year ago

jayshrivastava commented 1 year ago

See https://github.com/cockroachlabs/support/issues/2679.

The problem:

In this scenario, there's a changefeed running with execution_locality = foo on a table which is configured to with a leaseholder preference in region bar. The table foo has 150k ranges. Region bar has ~20 nodes and region foo has ~10.

We observed the following problems:

The solution:

We want to add "planning modes" where we can choose how to distribute work to nodes when we plan a changefeed. Namely, we want 3 modes:

Jira issue: CRDB-33248

blathers-crl[bot] commented 1 year ago

cc @cockroachdb/cdc

miretskiy commented 11 months ago

@jayshrivastava FYI: with https://github.com/cockroachdb/cockroach/pull/114710 the work on this issue might become obsolete, and we may just get rid of balanced range distribution altogether.

jayshrivastava commented 11 months ago

Linking this related issue: https://cockroachlabs.slack.com/archives/C0KB9Q03D/p1701101549923459

rharding6373 commented 8 months ago

Reducing priority level to P-3. We already have a rebalancing strategy (balanced simple distribution) that addresses the overload concerns in the support issue, so we do not have an urgent need for additional strategies.