xumingming commented on code in PR #3670:
URL: https://github.com/apache/celeborn/pull/3670#discussion_r3233062680


##########
client/src/main/java/org/apache/celeborn/client/ShuffleClientImpl.java:
##########
@@ -1404,6 +1398,23 @@ public int mergeData(
         false);
   }
 
+  @Override
+  public void computeBatchCRC(
+      int shuffleId,
+      int mapId,
+      int attemptId,
+      int partitionId,
+      byte[] data,
+      int offset,
+      int length) {
+    if (!shuffleIntegrityCheckEnabled) {
+      return;
+    }
+    final String mapKey = Utils.makeMapKey(shuffleId, mapId, attemptId);
+    PushState pushState = getPushState(mapKey);
+    pushState.addDataWithOffsetAndLength(partitionId, data, offset, length);
+  }

Review Comment:
   The comment sounds right on high level: PushState are mutated cross-threads. 
But not necessarily true on micro-level: PushState.addDataWithOffsetAndLength 
mutable PushState.commitMetadataMap, before this PR, it is mutated on 
DataPusher thread; After this PR, it is mutated on writer thread. 
PushState.commitMetadataMap is never mutated cross multiple threads. So to keep 
things simple, will not do the change the comments suggested.



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