morrySnow opened a new pull request, #68302:
URL: https://github.com/apache/doris/pull/68302
### What problem does this PR solve?
Issue Number: N/A
Related PR: N/A
Problem Summary:
A non-master FE transition can be interrupted when a newer BDB state is
queued while the listener waits for metadata readiness. The listener previously
still committed the target FE type even though non-master initialization,
including MetricRepo.init(), had not run. A repeated FOLLOWER or OBSERVER
notification was then treated as redundant, leaving the FE in an incompletely
initialized state.
This change makes transferToNonMaster() report whether the transition
completed and updates feType only after all initialization finishes. An
interrupted transition retains the previous committed state so the queued event
is evaluated against the state that was actually initialized and can retry the
transition.
### Release note
Fix FE state transitions that could leave a follower or observer serving
queries before non-master initialization completed.
### Check List (For Author)
- Test: Unit Test
- ./run-fe-ut.sh --run org.apache.doris.catalog.EnvStateListenerTest
- cd fe and run mvn checkstyle:check -pl fe-core
- Behavior changed: Yes. Interrupted non-master transitions no longer
publish an incomplete FE type.
- Does this need documentation: No
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]