fix(starrocks-ce): make FE memberLeave single-shot and fail closed#3209
Open
weicao wants to merge 2 commits into
Open
fix(starrocks-ce): make FE memberLeave single-shot and fail closed#3209weicao wants to merge 2 commits into
weicao wants to merge 2 commits into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3209 +/- ##
======================================
Coverage 0.00% 0.00%
======================================
Files 147 149 +2
Lines 23282 23633 +351
======================================
- Misses 23282 23633 +351 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
leon-ape
reviewed
Jul 15, 2026
| local host="$1" | ||
| local port="$2" | ||
|
|
||
| query_frontends "post-drop-query" || return 1 |
Contributor
There was a problem hiding this comment.
After DROP FOLLOWER succeeds against LEADER_HOST, this verification still queries the load-balanced FE_DISCOVERY_SERVICE_NAME. That Service continues to include the leaving Pod until memberLeave succeeds, so the query can reach the dropped FE and read its stale local membership view, falsely returning post-drop-membership-not-converged and repeatedly retrying the action.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root cause
The FE
memberLeaveaction treatedALTER SYSTEM DROP FOLLOWERrc=0 as completion without proving the leaving pod identity absent from a fresh membership snapshot, and the leader-removal path polled for up to 120 seconds inside a kbagent action clamped at 60 seconds. Missing target identity could also fall through to the idempotent already-absent rc0 path. These gaps could delete a Pod while leaving a ghost FE member, or time out without a classified result.This PR is limited to the StarRocks-CE FE memberLeave product path, its CmpD timeout, and focused ShellSpec contracts.
Base and head
41801859b685dea4f8d603b7aa4b90a7fb52e2d187fda89beaaa8c218c16dc4aab29173421198a63be65efb11d08a5593d2fb38f9c7f0576d6b76225Behavior
KB_LEAVE_MEMBER_POD_NAME,FE_DISCOVERY_SERVICE_NAME, andSTARROCKS_USERbefore runtime discovery or any MySQL/Java command. Empty passwords remain supported.SHOW FRONTENDSas an authoritative exact 16-column snapshot with unique FE names/endpoints and exactly one leader before success or mutation.pod-name.FQDN boundary, not a longer pod-name prefix.SHOW FRONTENDSsimultaneously proves the old exact host plus EditLogPort absent and the leaving pod identity has zero matches. An endpoint change for the same pod therefore cannot produce false success.retry_safe=true; missing required input, invalid snapshots, and rejected query/ALTER/BDB commands asretry_safe=false.MYSQL_PWDrather than a password argument and redacts both credential values from diagnostics.Time budget
run_bounded_command, reserves one launch-rollover second plus one--kill-after=1second, and clips the TERM window to the remainder. If the remaining window is exhausted, no subprocess starts and the action returns classified rc124.retry_safe=true.RED to GREEN ledger
Verification
31 examples, 0 failuresbash -n: cleangit diff --check: cleanhelm lint addons/starrocks-ce: 1 chart linted, 0 failed (icon recommendation only)memberLeave.timeoutSeconds=50,/bin/bash -c /scripts/fe-member-leave.sh,container: fememberLeaveto the exact FE imageAPPROVED blocker0An earlier whole-repository ShellSpec run produced
1008 examples, with 9 unrelated baseline failures in FalkorDB dependency and MariaDB render paths, plus 12 skips and 9 pending. This PR claims only the focused StarRocks-CE result above.Production image gate
starrocks/fe-ubuntu:3.2.2digestsha256:6446acb1a16ce103476b17c3844e9f7e12cd09ac188cfe8ff01aad56ca87e612starrocks/fe-ubuntu:3.3.0digestsha256:ef86f9cdf06bf71b01baedbd16bb72b662b7abe475f447ad4f4025e77ab2c40a/bin/bash, mysql, Java, GNU timeout, and exactly one readable StarRocks BDB JE jar./bin/bashin both images and returned a classified rc1 on an unavailable endpoint without exposing the password.Live acceptance plan
After product and lifecycle review approve this exact head, the test owner will package the exact commit and return: chart package SHA256, rendered memberLeave CmpD/CmpV structure, installed chart/source identity, live ComponentDefinition/ComponentVersion images, and fresh scale-in evidence. Existing frozen and fresh scenes remain untouched until that gate.