gauravkm commented on code in PR #3261:
URL: https://github.com/apache/celeborn/pull/3261#discussion_r2109663105


##########
client/src/main/scala/org/apache/celeborn/client/commit/ReducePartitionCommitHandler.scala:
##########
@@ -268,16 +276,40 @@ class ReducePartitionCommitHandler(
       numMappers: Int,
       partitionId: Int,
       pushFailedBatches: util.Map[String, LocationPushFailedBatches],
-      recordWorkerFailure: ShuffleFailedWorkers => Unit): (Boolean, Boolean) = 
{
+      recordWorkerFailure: ShuffleFailedWorkers => Unit,
+      numPartitions: Int,
+      crc32PerPartition: Array[Int],
+      bytesWrittenPerPartition: Array[Long]): (Boolean, Boolean) = {
     shuffleMapperAttempts.synchronized {
       if (getMapperAttempts(shuffleId) == null) {
         logDebug(s"[handleMapperEnd] $shuffleId not registered, create one.")
-        initMapperAttempts(shuffleId, numMappers)
+        initMapperAttempts(shuffleId, numMappers, numPartitions)
       }
 
       val attempts = shuffleMapperAttempts.get(shuffleId)
       if (attempts(mapId) < 0) {
         attempts(mapId) = attemptId
+        if (shuffleIntegrityCheckEnabled) {
+          val commitMetadataArray = commitMetadataForReducer.get(shuffleId)
+          checkState(
+            commitMetadataArray != null,
+            "commitMetadataArray can only be null if shuffleId %s is not 
registered",
+            shuffleId)
+          for (i <- 0 until numPartitions) {
+            if (crc32PerPartition(i) != 0) {

Review Comment:
   Oh interesting. Good point. I will update



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