You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by GitBox <gi...@apache.org> on 2021/12/02 14:16:07 UTC

[GitHub] [ratis] guohao-rosicky opened a new pull request #552: RATIS-1457. DataStreamManagement sync startTransaction

guohao-rosicky opened a new pull request #552:
URL: https://github.com/apache/ratis/pull/552


   ## What changes were proposed in this pull request?
   
   DataStreamManagement sync startTransaction
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/RATIS-1457


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



[GitHub] [ratis] szetszwo commented on pull request #552: RATIS-1457. DataStreamManagement sync startTransaction

Posted by GitBox <gi...@apache.org>.
szetszwo commented on pull request #552:
URL: https://github.com/apache/ratis/pull/552#issuecomment-985982903


   @guohao-rosicky , try revert the change.  These tests will pass immediately.


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



[GitHub] [ratis] szetszwo commented on pull request #552: RATIS-1457. DataStreamManagement sync startTransaction

Posted by GitBox <gi...@apache.org>.
szetszwo commented on pull request #552:
URL: https://github.com/apache/ratis/pull/552#issuecomment-985296365


   The test failure seems related.  Please take a look.


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



[GitHub] [ratis] guohao-rosicky commented on a change in pull request #552: RATIS-1457. DataStreamManagement sync startTransaction

Posted by GitBox <gi...@apache.org>.
guohao-rosicky commented on a change in pull request #552:
URL: https://github.com/apache/ratis/pull/552#discussion_r761642062



##########
File path: ratis-netty/src/main/java/org/apache/ratis/netty/server/DataStreamManagement.java
##########
@@ -323,16 +323,16 @@ static void sendReply(List<CompletableFuture<DataStreamReply>> remoteWrites,
     ctx.writeAndFlush(builder.build());
   }
 
-  private CompletableFuture<Void> startTransaction(StreamInfo info, DataStreamRequestByteBuf request, long bytesWritten,
+  private void startTransaction(StreamInfo info, DataStreamRequestByteBuf request, long bytesWritten,

Review comment:
       Has been modified




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



[GitHub] [ratis] szetszwo commented on a change in pull request #552: RATIS-1457. DataStreamManagement sync startTransaction

Posted by GitBox <gi...@apache.org>.
szetszwo commented on a change in pull request #552:
URL: https://github.com/apache/ratis/pull/552#discussion_r761609329



##########
File path: ratis-netty/src/main/java/org/apache/ratis/netty/server/DataStreamManagement.java
##########
@@ -323,16 +323,16 @@ static void sendReply(List<CompletableFuture<DataStreamReply>> remoteWrites,
     ctx.writeAndFlush(builder.build());
   }
 
-  private CompletableFuture<Void> startTransaction(StreamInfo info, DataStreamRequestByteBuf request, long bytesWritten,
+  private void startTransaction(StreamInfo info, DataStreamRequestByteBuf request, long bytesWritten,

Review comment:
       Let's keep it async and sync it outside.
   ```
   +++ b/ratis-netty/src/main/java/org/apache/ratis/netty/server/DataStreamManagement.java
   @@ -409,7 +409,7 @@ public class DataStreamManagement {
              } else if (close) {
                if (info.isPrimary()) {
                  // after all server close stream, primary server start transaction
   -              startTransaction(info, request, bytesWritten, ctx);
   +              startTransaction(info, request, bytesWritten, ctx).join();
                } else {
                  sendReply(remoteWrites, request, bytesWritten, info.getCommitInfos(), ctx);
                }
   ```




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



[GitHub] [ratis] szetszwo edited a comment on pull request #552: RATIS-1457. DataStreamManagement sync startTransaction

Posted by GitBox <gi...@apache.org>.
szetszwo edited a comment on pull request #552:
URL: https://github.com/apache/ratis/pull/552#issuecomment-985982903


   @guohao-rosicky , try reverting the change.  These tests will pass immediately.


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



[GitHub] [ratis] guohao-rosicky commented on pull request #552: RATIS-1457. DataStreamManagement startTransaction error handler

Posted by GitBox <gi...@apache.org>.
guohao-rosicky commented on pull request #552:
URL: https://github.com/apache/ratis/pull/552#issuecomment-989487954


   I reworked the code to get exceptions without having to wait sync, which was low performance. Added whenComplate method to handle exceptions and send exception messages
   
   @szetszwo Please take a look.


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



[GitHub] [ratis] szetszwo merged pull request #552: RATIS-1457. DataStreamManagement startTransaction error handler

Posted by GitBox <gi...@apache.org>.
szetszwo merged pull request #552:
URL: https://github.com/apache/ratis/pull/552


   


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



[GitHub] [ratis] guohao-rosicky commented on pull request #552: RATIS-1457. DataStreamManagement sync startTransaction

Posted by GitBox <gi...@apache.org>.
guohao-rosicky commented on pull request #552:
URL: https://github.com/apache/ratis/pull/552#issuecomment-985359966


   Seems to have nothing to do with the submitted code
   ```
   Errors: 
   Error:    TestFileStoreStreamingWithGrpcCluster>FileStoreStreamingBaseTest.testFileStoreStreamMultipleFiles:100->FileStoreStreamingBaseTest.testMultipleFiles:138 » TestTimedOut
   Error:    TestFileStoreStreamingWithGrpcCluster>FileStoreStreamingBaseTest.testFileStoreStreamSingleFile:78->FileStoreStreamingBaseTest.testSingleFile:116 » TestTimedOut
   ```


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