branch-4.1: [fix](fe) add --drop_backends param to start_fe.sh (#63306)#63515
Conversation
This PR adds a --drop_backends startup flag for Doris FE, wiring it through bin/start_fe.sh into FE argument parsing, and executing backend removal when the FE becomes master.
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
There was a problem hiding this comment.
Pull request overview
This PR backports a new FE startup flag --drop_backends that, when enabled, triggers Doris FE to remove all backends from cluster metadata at the moment the FE becomes MASTER. It’s wired end-to-end from bin/start_fe.sh through FE argument parsing into Env.transferToMaster() (and is also enabled during the cloud recovery path in the docker compose runtime init script).
Changes:
- Add
--drop_backendsoption parsing inbin/start_fe.shand forward it toorg.apache.doris.DorisFE. - Extend FE CLI parsing (
DorisFE.parseArgs) to set a system property flag fordrop_backends. - When transferring to MASTER (
Env.transferToMaster), drop all backends (non-cloud viadropBackend, cloud viaCloudSystemInfoService.updateCloudBackends). - Enable
--drop_backendsautomatically in the cloud recovery startup path (docker/runtime/.../init_fe.sh).
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
fe/fe-core/src/main/java/org/apache/doris/DorisFE.java |
Adds the --drop_backends CLI option and sets the corresponding system property. |
fe/fe-core/src/main/java/org/apache/doris/common/FeConstants.java |
Introduces the DROP_BACKENDS_KEY constant. |
fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java |
Drops all backends during transferToMaster() when the flag is enabled. |
docker/runtime/doris-compose/resource/init_fe.sh |
Appends --drop_backends to recovery startup args in cloud compose runtime. |
bin/start_fe.sh |
Parses and forwards the new --drop_backends shell flag to FE. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } catch (Exception e) { | ||
| LOG.warn("failed to drop backends", e); | ||
| } | ||
| System.clearProperty(FeConstants.DROP_BACKENDS_KEY); | ||
| LOG.info("finished dropping all backends"); |
|
run buildall |
FE Regression Coverage ReportIncrement line coverage |
pick #63306