After unrecoverable errors, ZeebePartition
accesses closed raft context
#11070
Labels
component/partition-transitions
kind/bug
Categorizes an issue or PR as a bug
version:8.1.7
Marks an issue as being completely or in parts released in 8.1.7
version:8.2.0-alpha4
Marks an issue as being completely or in parts released in 8.2.0-alpha4
version:8.2.0
Marks an issue as being completely or in parts released in 8.2.0
Describe the bug
When handling unrecoverable errors,
ZeebePartition
shuts down the raft context:zeebe/broker/src/main/java/io/camunda/zeebe/broker/system/partitions/ZeebePartition.java
Line 377 in e15428b
which triggers an async transition to inactive:
zeebe/atomix/cluster/src/main/java/io/atomix/raft/impl/DefaultRaftServer.java
Line 135 in ae10d8f
Because this transition is async, the
ZeebePartition
continues to run on a closed raft context which can cause various issues, for example attempts to access a closed journal. This can then cause further issues, for example failed transitions.Expected behavior
When the
ZeebePartition
decides to close the raft context, it should first remove itself as a role change listener, trigger the transition toINACTIVE
itself and only close the raft context on completion of the transition.related to #10776
The text was updated successfully, but these errors were encountered: