alex-plekhanov commented on a change in pull request #8483:
URL: https://github.com/apache/ignite/pull/8483#discussion_r534708797



##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/client/thin/TcpClientChannel.java
##########
@@ -292,7 +233,8 @@ private ClientRequestFuture send(ClientOperation op, 
Consumer<PayloadOutputChann
 
             req.writeInt(0, req.position() - 4); // Actual size.
 
-            write(req.array(), req.position());
+            // arrayCopy is required, because buffer is pooled, and write is 
async.
+            write(req.arrayCopy(), req.position());

Review comment:
       If the timeout is too low, there are no guarantees that the message 
already sent when control returned to the user thread after 
`pendingReq.get(timeout)`




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

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


Reply via email to