Description
RATIS-1994 adds a feature allowing AsyncApi#send() to return only when a specified replication level is reached. This was done by adding waitForReplication() in RaftServer.
However, two bugs are found with RATIS-1994 when the (write) replication level is set to higher than MAJORITY (the default):
1. When the request is retried (e.g. when timed out), the future retrieved from cache is not correctly waited on with waitForReplication() again. This causes divergence in the desired behavior depending on if the request is retried or not. This is fixed by invoking waitForReplication() in writeAsync() rather than appendTransaction().
2. waitForReplication()'s watch request reply was incorrectly ignored, this is fixed by combining the reply from write and watch together using combineReplies()
Attachments
Issue Links
- is caused by
-
RATIS-1994 AsyncApi send() to support optional replication level
- Resolved
- is required by
-
HDDS-10108 [hsync] Adopt RATIS-1994 to reduce hsync latency
- Patch Available
- links to