Repository navigation
Description
Describe the bug
When the cluster runs in shared_nothing mode but uses Compute Nodes (CN) with autoscaling (autoScalingPolicy → operator-created HPA), the operator never deregisters CN from the FE on scale-in.
The CN→FE reconciliation SyncComputeNodesInFE is gated to shared-data mode only — in SyncCnSpec (pkg/subcontrollers/cn/cn_controller.go):
// only take effect for shared-data mode
if !fe.IsRunInSharedDataMode(feconfig) {
return nil
}So in shared_nothing mode the drop logic added in #663 (and fixed in #714) is never reached. Every CN removed by a scale-down stays registered in the FE as Alive: false with ErrMsg: java.net.UnknownHost (its pod FQDN no longer resolves), and these accumulate up to maxReplicas. Consequences:
fe.warn.logfloods withfailed to get right ip by fqdn kube-starrocks-cn-<N>at tens–hundreds of lines/sec.- The query planner intermittently routes to these dead nodes and fails with
ANALYSIS_ERR(queries never execute;Time=0-1ms), causing intermittent failures for clients that query via CN (e.g. Tableau extracts).
This is the shared_nothing counterpart of #713. The database side intentionally delegated CN deregistration to the operator in StarRocks/starrocks#62915 — but the operator only performs it in shared-data mode.
Note (for a complete fix): even if the shared-data gate is removed, the drop groups nodes by a
WarehouseNamecolumn (ComputeNodesByWarehouse[...]incn_mysql.go) and looks up"default_warehouse". Inshared_nothingmodeSHOW COMPUTE NODESdoes not return aWarehouseNamecolumn, so the lookup is empty and the drop loop still won't fire. A robust fix should handle the absence of warehouse info (treat all CN as one group) and drop withALTER SYSTEM DROP COMPUTE NODE "<host>:<port>"(noFROM WAREHOUSEclause).
To Reproduce
Steps to reproduce the behavior:
- Deploy
kube-starrockswith FE + BE + CN.run_modedefaults toshared_nothing(norun_modeinfe.conf). - Enable CN autoscaling: set
starRocksCnSpec.autoScalingPolicy(the operator creates the CN HPA). - Scale CN up, then down — via the HPA or by changing min/max (e.g.
2 → 15 → drain back to 5). - Connect to the FE and run
SHOW COMPUTE NODES.
Observed:
- Removed CN remain listed with
Alive=false,SystemDecommissioned=false,ErrMsg=java.net.UnknownHost, and a frozenLastHeartbeat; they are never removed. - Example: 20 registered / 5 actually running / 15 dead "ghost" nodes (
cn-5..cn-19), the dead set capped atmaxReplicas. - FE log floods continuously:
failed to get right ip by fqdn kube-starrocks-cn-17.... - Operator logs show no
DROP COMPUTE NODE/ FE-connection activity for CN (only routine reconcile). - Manually running
ALTER SYSTEM DROP COMPUTE NODE "<fqdn>:<heartbeat_port>"removes them and immediately stops the FQDN-resolution flood — confirming the FE entries are stale and should have been dropped by the operator.
Expected behavior
The operator should deregister scaled-in CN from the FE in shared_nothing mode as well — it already manages the CN StatefulSet and HPA in this mode, so leaving the FE membership uncleaned is inconsistent. Either:
- run the CN→FE reconciliation (the [Enhancement] Detect scale-in and drop CN node from FE #663 logic) regardless of
run_mode(CN exist and are scaled in both modes), or - if CN-with-autoscaling under
shared_nothingis intentionally unsupported, document it and don't create the CN HPA there.
Today, SyncComputeNodesInFE returning early for non-shared-data clusters leaves dead CN registered indefinitely.
Please complete the following information
- Operator Version: v1.11.4
- Chart Name: kube-starrocks
- Chart Version: v1.11.4
- Additional: StarRocks
CURRENT_VERSION()=branch-4.1-…(chartappVersionlabel3.5-latest);run_mode=shared_nothing; single FE; CN autoscaling viaautoScalingPolicy.
Activity
digitalpoetry commentedon Sep 16, 2026
👋 Thanks for the detailed issue report and investigation. I've attempted a fix in #802