You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "RockteMQ-AI (via GitHub)" <gi...@apache.org> on 2026/09/05 00:04:41 UTC
Re: [I] Operator will update nameservers addr always. [rocketmq-operator]
RockteMQ-AI commented on issue #120:
URL: https://github.com/apache/rocketmq-operator/issues/120#issuecomment-5547874590
**Issue Evaluation**
Category: `bug` | Status: **Confirmed**
The operator unnecessarily updates the NameServer StatefulSet on every reconciliation loop because `reflect.DeepEqual` compares string slices by element order, while Kubernetes may return the list in a different order than what is defined in the CRD.
**Root Cause:** In the reconciliation logic, the operator compares the desired NameServer list with the current StatefulSet's command args. Even when the content is identical, `reflect.DeepEqual` returns false if the ordering differs, triggering an unnecessary update.
**Impact:** Continuous unnecessary updates to the NameServer StatefulSet, which can cause brief disruptions and noisy reconciliation logs.
**Fix:** Sort both slices before comparison, or use a set-based comparison (e.g., `cmp.Diff` with `cmpopts.SortSlices`).
**Note:** This issue has been open since Dec 2022 and marked stale. The fix is straightforward and would be a good first contribution.
---
*Automated evaluation by github-manager*
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org