Skip to content

fix: stop config retry for stopped components#41

Open
im0x0ing wants to merge 1 commit into
labring:fix/v0.9.3from
im0x0ing:fix-config-retry-stopped-component
Open

fix: stop config retry for stopped components#41
im0x0ing wants to merge 1 commit into
labring:fix/v0.9.3from
im0x0ing:fix-config-retry-stopped-component

Conversation

@im0x0ing

Copy link
Copy Markdown
Collaborator

Fix repeated configuration retry for stopped components.

When a component is stopped in 0.9, ClusterComponent.spec.stop=true is set while spec.replicas may remain greater than 0. The underlying InstanceSet is scaled to 0 and no pods exist. However, the configuration sync policy only checked the target replicas and treated pods=0 as an abnormal state, causing repeated retries and noisy logs.

Changes

  • Add stopped-state detection for reconfigure params:
    • stop=true means the component is stopped in the current 0.9 mechanism.
    • replicas=0 is kept as backward compatibility for the legacy stop mechanism.
  • Update sync dynamic reload policy:
    • If no pods are found and the target component is stopped, return success instead of retrying.
    • If no pods are found but the component is not stopped, keep the original retry behavior.
  • Add tests for no-pod sync behavior:
    • stop=true + replicas>0 + pods=0 should not retry.
    • replicas=0 + pods=0 should not retry.
    • replicas>0 + not stopped + pods=0 should still retry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant