branch-4.0: [fix](fe) add --drop_backends param to start_fe.sh (#63306)#63795
Merged
Conversation
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
Author
|
run buildall |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR backports a new FE startup flag --drop_backends to branch-4.0, wiring it from bin/start_fe.sh into FE argument parsing and executing backend removal when the FE transitions to MASTER (including a docker-compose cloud recovery path).
Changes:
- Add
--drop_backendsparsing inbin/start_fe.shand propagate it into the FE Java process args. - Add FE CLI option/system property plumbing (
FeConstants+DorisFE.parseArgs) fordrop_backends. - On master transfer (
Env.transferToMaster()), drop all backends (normal mode) or delete cloud backends (cloud mode); docker cloud recovery script now enables this flag during metadata failure recovery.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| fe/fe-core/src/main/java/org/apache/doris/DorisFE.java | Adds a new CLI option and sets a system property when --drop_backends is present. |
| fe/fe-core/src/main/java/org/apache/doris/common/FeConstants.java | Defines the drop_backends system property key. |
| fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java | Executes backend deletion when the FE becomes MASTER and the flag is set. |
| docker/runtime/doris-compose/resource/init_fe.sh | Enables --drop_backends during cloud snapshot restore recovery startup. |
| bin/start_fe.sh | Adds --drop_backends getopt parsing and passes it to the FE JVM command line. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1778
to
+1782
| if (Config.isNotCloudMode()) { | ||
| for (Backend be : bes) { | ||
| systemInfoService.dropBackend(be.getHost(), be.getHeartbeatPort()); | ||
| } | ||
| } else { |
Comment on lines
+1785
to
+1789
| } catch (Exception e) { | ||
| LOG.warn("failed to drop backends", e); | ||
| } | ||
| System.clearProperty(FeConstants.DROP_BACKENDS_KEY); | ||
| LOG.info("finished dropping all backends"); |
Contributor
FE UT Coverage ReportIncrement line coverage |
morningman
approved these changes
May 29, 2026
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.
pick #63306