duongkame commented on PR #1007:
URL: https://github.com/apache/ratis/pull/1007#issuecomment-1888097768

   The `TestMessageStreamApiWithGrpc.testStream` seems to become flaky after 
this chance. The failure looks quite serious. 
   The test looks like below:
   ```
      // stream multiple parts
       final int numParts = 9;
       final int endOfRequest = 6;
       final StringBuilder key = new StringBuilder();
       try(RaftClient client = cluster.createClient();
           MessageOutputStream out = client.getMessageStreamApi().stream()) {
         for (int i = 1; i <= numParts; i++) {
           key.append(i);
           SimpleMessage message = new SimpleMessage(i + "");
           boolean end = i == endOfRequest;
           LOG.info("Sending: {}, end = {}",  message.messageId, end);
           out.sendAsync(message, end);
         }
       }
       // check if all the parts are streamed as a single message.
   ```
   I think two messages `123456` and `789` is supposed to be committed.
   However, the logs of the failures show that other messages are committed, 
e.g.
   
   ```
   2024-01-11 14:46:46,921 [Time-limited test] INFO  
grpc.TestMessageStreamApiWithGrpc 
(MessageStreamApiTests.java:runTestStream(71)) - Sending: 1, end = false
   2024-01-11 14:46:46,931 [Time-limited test] INFO  
grpc.TestMessageStreamApiWithGrpc 
(MessageStreamApiTests.java:runTestStream(71)) - Sending: 2, end = false
   2024-01-11 14:46:46,931 [Time-limited test] INFO  
grpc.TestMessageStreamApiWithGrpc 
(MessageStreamApiTests.java:runTestStream(71)) - Sending: 3, end = false
   2024-01-11 14:46:46,932 [Time-limited test] INFO  
grpc.TestMessageStreamApiWithGrpc 
(MessageStreamApiTests.java:runTestStream(71)) - Sending: 4, end = false
   2024-01-11 14:46:46,932 [Time-limited test] INFO  
grpc.TestMessageStreamApiWithGrpc 
(MessageStreamApiTests.java:runTestStream(71)) - Sending: 5, end = false
   2024-01-11 14:46:46,932 [Time-limited test] INFO  
grpc.TestMessageStreamApiWithGrpc 
(MessageStreamApiTests.java:runTestStream(71)) - Sending: 6, end = true
   2024-01-11 14:46:46,932 [Time-limited test] INFO  
grpc.TestMessageStreamApiWithGrpc 
(MessageStreamApiTests.java:runTestStream(71)) - Sending: 7, end = false
   2024-01-11 14:46:46,932 [Time-limited test] INFO  
grpc.TestMessageStreamApiWithGrpc 
(MessageStreamApiTests.java:runTestStream(71)) - Sending: 8, end = false
   2024-01-11 14:46:46,932 [Time-limited test] INFO  
grpc.TestMessageStreamApiWithGrpc 
(MessageStreamApiTests.java:runTestStream(71)) - Sending: 9, end = false
   ....
   2024-01-11 14:46:46,995 [s0@group-F60956FB3D4A-StateMachineUpdater] INFO  
impl.SimpleStateMachine4Testing (SimpleStateMachine4Testing.java:put(205)) - 
s0: put 1, 623456 -> (t:1, i:1), STATEMACHINELOGENTRY, 46@client-B3C3E9191731
   2024-01-11 14:46:46,998 [s0@group-F60956FB3D4A-StateMachineUpdater] INFO  
impl.SimpleStateMachine4Testing (SimpleStateMachine4Testing.java:put(205)) - 
s0: put 2, 789 -> (t:1, i:2), STATEMACHINELOGENTRY, 50@client-B3C3E9191731
   2024-01-11 14:46:47,012 [s2@group-F60956FB3D4A-StateMachineUpdater] INFO  
impl.SimpleStateMachine4Testing (SimpleStateMachine4Testing.java:put(205)) - 
s2: put 1, 623456 -> (t:1, i:1), STATEMACHINELOGENTRY, 46@client-B3C3E9191731
   2024-01-11 14:46:47,012 [s1@group-F60956FB3D4A-StateMachineUpdater] INFO  
impl.SimpleStateMachine4Testing (SimpleStateMachine4Testing.java:put(205)) - 
s1: put 1, 623456 -> (t:1, i:1), STATEMACHINELOGENTRY, 46@client-B3C3E9191731
   2024-01-11 14:46:47,023 [s2@group-F60956FB3D4A-StateMachineUpdater] INFO  
impl.SimpleStateMachine4Testing (SimpleStateMachine4Testing.java:put(205)) - 
s2: put 2, 789 -> (t:1, i:2), STATEMACHINELOGENTRY, 50@client-B3C3E9191731
   2024-01-11 14:46:47,023 [s1@group-F60956FB3D4A-StateMachineUpdater] INFO  
impl.SimpleStateMachine4Testing (SimpleStateMachine4Testing.java:put(205)) - 
s1: put 2, 789 -> (t:1, i:2), STATEMACHINELOGENTRY, 50@client-B3C3E9191731
   ```
   I'm debugging to understand the issue, but it'll be very helpful if you can 
have a quick look.  @szetszwo 


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to