zclllyybb opened a new pull request, #66552: URL: https://github.com/apache/doris/pull/66552
## What problem does this PR solve? An async dictionary load task writes the INC version journal, then DROP deletes the dictionary, then a failed BE commit writes a DEC journal for the already dropped dictionary. Followers exit while replaying the DEC journal because the dictionary cannot be found by name anymore, and the cluster cannot recover since the bad journal is persistent. Root cause: the commit failure rollback runs outside the manager lock and does not check whether the dictionary is still current, so DROP can interleave between the INC journal and the rollback DEC journal. Replay of the DEC journal looks the dictionary up by name and throws when it is gone, which makes EditLog.loadJournal exit the FE. Fix: on commit failure, only persist the DEC journal while the dictionary is still the current one (identity check under the manager read lock), so the journal stream becomes CREATE -> INC -> DROP instead of CREATE -> INC -> DROP -> DEC. Replay of increase/decrease version journals is made idempotent and keyed by dictionary id, so a DEC journal of an already dropped or recreated dictionary is a no-op instead of a fatal error. ## Release note None ## Check List (For Author) - Test: Unit test DictionaryManagerTest (replay idempotency, journal order CREATE -> INC -> DROP -> DEC, ABA recreated same-name dictionary) and docker regression test test_dictionary_drop_while_load_commit_fail (deterministic race reproduction via debug points). - Behavior changed: No - 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]
