You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@seata.apache.org by "slievrly (via GitHub)" <gi...@apache.org> on 2026/09/26 07:04:31 UTC
[I] [Bug] Late Raft leader callbacks submit metadata after apply queue shutdown [incubator-seata]
slievrly opened a new issue, #8256:
URL: https://github.com/apache/incubator-seata/issues/8256
### Check Ahead
- [x] Searched existing issues for applyQueue shutdown errors.
- [x] Willing to fix.
### Issue Description
RaftServer.destroy shuts down the Raft group while a queued leader-start callback can still call RaftStateMachine.syncMetadata. That callback submits a task after JRaft has cleared its applyQueue, causing a NullPointerException which syncMetadata logs and swallows.
### Evidence
[Java 17 CI job](https://github.com/apache/incubator-seata/actions/runs/35840434140/job/107113931949), commit 96e84e52f, raw lines 32366-32389 during BranchSessionExecuteTest teardown. Stack: NodeImpl.apply -> RaftTaskUtil.createTask -> syncMetadata -> onLeaderStart -> ConfigurationChangeDone. Node shutdown is already underway and onLeaderStop follows. This is a lifecycle race, not an injected null queue test.
### Expected behavior
Quiesce metadata submission before shutting down JRaft. Delayed leader callbacks must not restore leadership or submit new tasks, and pending metadata retries should be cancelled.
### Environment
Seata 2.8.0-SNAPSHOT, Java 17, Raft session mode.
--
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: notifications-unsubscribe@seata.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org