shishkovilja commented on code in PR #12663:
URL: https://github.com/apache/ignite/pull/12663#discussion_r2737850066


##########
modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryIoSession.java:
##########
@@ -246,7 +246,7 @@ <T> T readMessage() throws IgniteCheckedException, 
IOException {
      * @throws IgniteCheckedException If serialization fails.
      * @throws IOException If serialization fails.
      */
-    byte[] serializeMessage(TcpDiscoveryAbstractMessage msg) throws 
IgniteCheckedException, IOException {
+    synchronized byte[] serializeMessage(TcpDiscoveryAbstractMessage msg) 
throws IgniteCheckedException, IOException {

Review Comment:
   Because there is a race condition between `RingMessageWorker` and 
`ClientMessageWorker`.
   I attached reproducer in the ticket, we can get assertion error during 
message write.



##########
modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryIoSession.java:
##########
@@ -246,7 +246,7 @@ <T> T readMessage() throws IgniteCheckedException, 
IOException {
      * @throws IgniteCheckedException If serialization fails.
      * @throws IOException If serialization fails.
      */
-    byte[] serializeMessage(TcpDiscoveryAbstractMessage msg) throws 
IgniteCheckedException, IOException {
+    synchronized byte[] serializeMessage(TcpDiscoveryAbstractMessage msg) 
throws IgniteCheckedException, IOException {

Review Comment:
   Because there is a race condition between `RingMessageWorker` and 
`ClientMessageWorker`.
   I have attached reproducer in the ticket, we can get assertion error during 
message write.



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