You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "smengcl (via GitHub)" <gi...@apache.org> on 2024/05/25 14:40:01 UTC
[PR] RATIS-2102. AsyncApi#send() is not handling retry and reply correctly for replication levels higher than MAJORITY [ratis]
smengcl opened a new pull request, #1104:
URL: https://github.com/apache/ratis/pull/1104
## What changes were proposed in this pull request?
Background: [RATIS-1994](https://issues.apache.org/jira/browse/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](https://issues.apache.org/jira/browse/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()`.
Thanks @szetszwo for the help during debugging and making the patch.
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/RATIS-2102
## How was this patch tested?
- Tested manually during HDDS-10108 dev. Maybe it is a good idea to add some test cases around this in Ratis.
--
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: issues-unsubscribe@ratis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] RATIS-2102. AsyncApi#send() is not handling retry and reply correctly for replication levels higher than MAJORITY [ratis]
Posted by "szetszwo (via GitHub)" <gi...@apache.org>.
szetszwo merged PR #1104:
URL: https://github.com/apache/ratis/pull/1104
--
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: issues-unsubscribe@ratis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] RATIS-2102. AsyncApi#send() is not handling retry and reply correctly for replication levels higher than MAJORITY [ratis]
Posted by "smengcl (via GitHub)" <gi...@apache.org>.
smengcl commented on PR #1104:
URL: https://github.com/apache/ratis/pull/1104#issuecomment-2138001402
Thanks @szetszwo for reviewing this!
--
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: issues-unsubscribe@ratis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org