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
29.92k stars 3.78k forks source link

kv: allocator should apply all span config changes proactivily #124426

Open andrewbaptist opened 4 months ago

andrewbaptist commented 4 months ago

Describe the problem

When a span config change is made it should apply immediately. In some cases the cluster waits until the system has scanned through to find the range instead of applying it immediately.

To Reproduce TODO: This has not been tested yet, but reported by a customer

We should first create a test that replicates this behavior.

Expected behavior We should be reactive to span config changes and apply all the changes immediately.

Jira issue: CRDB-38886

Epic CRDB-39952

arulajmani commented 3 months ago

When a span config change is made it should apply immediately. In some cases the cluster waits until the system has scanned through to find the range instead of applying it immediately.

We spoke about this in one of our meetings, so I'll capture the discussion here as well for others. The expectation is that this should already happen. See:

https://github.com/cockroachdb/cockroach/blob/3b969e3f0be88c9c81417bb4e40a06d464d65f11/pkg/kv/kvserver/store.go#L2550-L2552

@andrewbaptist mentioned that anecdotally, he's seen rare cases when this doesn't happen. We should clarify these.