deardeng opened a new pull request, #46783:
URL: https://github.com/apache/doris/pull/46783
### What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
Fix issue with SQL node decommissioning process
The SQL node decommissioning process does not wait for transactions at the
watermark level to complete before setting the backend's isDecommissioned
status to true.
As a result, the value displayed in show backends immediately reflects
isDecommissioned regardless of ongoing transactions initiated via SQL.
When a user calls drop be to remove a backend while there is only one
backend in the cluster, the edit log logs the drop backend action, which
removes the cluster information from memory.
After dropping the backend, the previous transaction watermark process
completes its tasks and attempts to modify the backend status, which requires
accessing the cluster information. However, since the cluster information has
already been deleted, this results in a null pointer exception (NPE) during the
lookup in the FE memory map, causing the FE to crash.
Additionally, the sequence of edit logs is fixed as follows:
Edit log logs drop backend
Edit log modifies backend
FE fails to start up
```
2025-01-10 05:46:15,070 ERROR (replayer|15) [EditLog.loadJournal():1251]
replay Operation Type 91, log id: 10578
java.lang.NullPointerException: Cannot invoke
"org.apache.doris.system.Backend.getCloudClusterName()" because "memBe" is null
at
org.apache.doris.cloud.system.CloudSystemInfoService.replayModifyBackend(CloudSystemInfoService.java:461)
~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.persist.EditLog.loadJournal(EditLog.java:432)
~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.catalog.Env.replayJournal(Env.java:2999)
~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.catalog.Env$4.runOneCycle(Env.java:2761)
~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.common.util.Daemon.run(Daemon.java:119)
~[doris-fe.jar:1.2-SNAPSHOT]
```
### Release note
None
### Check List (For Author)
- Test <!-- At least one of them must be included. -->
- [ ] Regression test
- [ ] Unit Test
- [x] Manual test (add detailed scripts or steps below)
- [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
- [ ] Previous test can cover this change.
- [ ] No code files have been changed.
- [ ] Other reason <!-- Add your reason? -->
- Behavior changed:
- [x] No.
- [ ] Yes. <!-- Explain the behavior change -->
- Does this need documentation?
- [x] No.
- [ ] Yes. <!-- Add document PR link here. eg:
https://github.com/apache/doris-website/pull/1214 -->
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR should
merge into -->
--
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]