sollhui opened a new pull request, #61881: URL: https://github.com/apache/doris/pull/61881
## Problem When a coordinate BE restarts, `HeartbeatMgr` calls `CloudGlobalTransactionMgr.abortTxnWhenCoordinateBeRestart`, which invokes `abortTransaction(dbId, txnId, reason)` with a **null** `txnCommitAttachment`. In this path, `handleAfterAbort` calls `cb.afterAborted()` directly on the `RoutineLoadJob` callback **without** first calling `cb.beforeAborted()`. `RoutineLoadJob.beforeAborted()` / `afterAborted()` use a lock-handoff pattern: - `beforeAborted()` calls `writeLock()` and keeps the lock on success - `afterAborted()` calls `writeUnlock()` in its `finally` block When `afterAborted()` is called without a preceding `beforeAborted()`, the write lock is never acquired, so `writeUnlock()` throws `IllegalMonitorStateException`. Because this is a `RuntimeException`, it escapes the `catch (UserException)` guard in `abortTransactionsByCoordinateBe` and propagates all the way to `HeartbeatMgr`'s executor, where it is logged as: -- 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]
