Skip to content

[fix] Watch every cluster referencing a shared core ConfigMap - #543

Open
Al-assad wants to merge 1 commit into
apache:masterfrom
Al-assad:fix/shared-configmap-watches
Open

Al-assad wants to merge 1 commit into
apache:masterfrom
Al-assad:fix/shared-configmap-watches

Conversation

@Al-assad

@Al-assad Al-assad commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

The core ConfigMap watch stored only one DorisCluster per ConfigMap, so reconciling a second cluster overwrote the first reference. The same mutable map was written by reconciliation and read by informer callbacks.

Replace it with a cache field index of the current core ConfigMap references. Enqueue all referencing clusters in the ConfigMap's namespace when contents change, and let index updates remove stale references when a CR changes, disables automatic restart, or is deleted. The existing EnableRestartWhenConfigChange option remains required.

Validation:

  • Reproduced two clusters retaining only the last registration before the fix.
  • Regression covers shared and duplicate FE/BE references, namespace isolation, opt-out, reference changes, deletion, and data/binary-data versus metadata-only events.
  • Targeted regressions pass with the Go race detector; the full controller package passes with Kubernetes 1.31 envtest.

QA validation passed with selectdb/doris-operator:26.1.0-rc04: two healthy DCRs shared fe-config with automatic restart enabled; a real FE configuration change restarted both referencing FE Pods and returned both to Ready in 82.201s. BE and CN Pod UIDs were unchanged. No new restart policy or CRD field is introduced.

@Al-assad
Al-assad marked this pull request as ready for review November 4, 2026 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant