Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
In the replication listener (PartitionReplicaListener) where we have the pattern:
raftFut.thenApply(ignored -> result);
we should worry about handling RAFT exceptions, including analyzing whether raftFut result.
Can distinguish following exception types for RAFT:
- RAFT cannot replicate a command for the timeout (TimeoutException). Hence, this exception leads to the replication timeout exception (ReplicationTimeoutException).
- It throws some internal exception (RaftException). This exception should be wrapped of the common replication exception (ReplicationException).
- Finally, RAFT throws java exceptions (NullPointerException, IndexOutOfRangeException e.t.c). Those exceptions shouldn't be touched, is will be through as is.