[PR] RATIS-2102. AsyncApi#send() is not handling retry and reply correctly for replication levels higher than MAJORITY [ratis]

2024-05-25 Thread via GitHub


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-unsubscr...@ratis.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Created] (RATIS-2102) AsyncApi#send() is not handling retry and reply correctly for replication levels higher than MAJORITY

2024-05-25 Thread Siyao Meng (Jira)
Siyao Meng created RATIS-2102:
-

 Summary: AsyncApi#send() is not handling retry and reply correctly 
for replication levels higher than MAJORITY
 Key: RATIS-2102
 URL: https://issues.apache.org/jira/browse/RATIS-2102
 Project: Ratis
  Issue Type: Bug
Affects Versions: 3.1.0
Reporter: Siyao Meng
Assignee: Siyao Meng


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()



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (RATIS-2102) AsyncApi#send() is not handling retry and reply correctly for replication levels higher than MAJORITY

2024-05-25 Thread Siyao Meng (Jira)


 [ 
https://issues.apache.org/jira/browse/RATIS-2102?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Siyao Meng updated RATIS-2102:
--
Component/s: server

> AsyncApi#send() is not handling retry and reply correctly for replication 
> levels higher than MAJORITY
> -
>
> Key: RATIS-2102
> URL: https://issues.apache.org/jira/browse/RATIS-2102
> Project: Ratis
>  Issue Type: Bug
>  Components: server
>Affects Versions: 3.1.0
>Reporter: Siyao Meng
>Assignee: Siyao Meng
>Priority: Major
>
> 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()



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


Re: [PR] RATIS-2093. Decouple metadata and configuration entries from appendEntries buffer for stateMachineCache' [ratis]

2024-05-25 Thread via GitHub


szetszwo commented on PR #1096:
URL: https://github.com/apache/ratis/pull/1096#issuecomment-2131264368

   @duongkame , deployed `3.1.0-640749b-SNAPSHOT`.


-- 
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-unsubscr...@ratis.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org