otterc commented on a change in pull request #32140: URL: https://github.com/apache/spark/pull/32140#discussion_r648567584
########## File path: core/src/main/scala/org/apache/spark/storage/ShuffleBlockFetcherIterator.scala ########## @@ -376,48 +418,62 @@ final class ShuffleBlockFetcherIterator( val blocksForAddress = mergedBlockInfos.map(info => (info.blockId, info.size, info.mapIndex)) hostLocalBlocksByExecutor += address -> blocksForAddress - hostLocalBlocks ++= blocksForAddress.map(info => (info._1, info._3)) + hostLocalBlocksCurrentIteration ++= blocksForAddress.map(info => (info._1, info._3)) hostLocalBlockBytes += mergedBlockInfos.map(_.size).sum } else { remoteBlockBytes += blockInfos.map(_._2).sum collectFetchRequests(address, blockInfos, collectedRemoteRequests) } } val numRemoteBlocks = collectedRemoteRequests.map(_.blocks.size).sum - val totalBytes = localBlockBytes + remoteBlockBytes + hostLocalBlockBytes - assert(numBlocksToFetch == localBlocks.size + hostLocalBlocks.size + numRemoteBlocks, - s"The number of non-empty blocks $numBlocksToFetch doesn't equal to the number of local " + - s"blocks ${localBlocks.size} + the number of host-local blocks ${hostLocalBlocks.size} " + - s"+ the number of remote blocks ${numRemoteBlocks}.") - logInfo(s"Getting $numBlocksToFetch (${Utils.bytesToString(totalBytes)}) non-empty blocks " + - s"including ${localBlocks.size} (${Utils.bytesToString(localBlockBytes)}) local and " + - s"${hostLocalBlocks.size} (${Utils.bytesToString(hostLocalBlockBytes)}) " + - s"host-local and $numRemoteBlocks (${Utils.bytesToString(remoteBlockBytes)}) remote blocks") + val totalBytes = localBlockBytes + remoteBlockBytes + hostLocalBlockBytes + + mergedLocalBlockBytes + val blocksToFetchCurrentIteration = numBlocksToFetch - prevNumBlocksToFetch + assert(blocksToFetchCurrentIteration == localBlocks.size + + hostLocalBlocksCurrentIteration.size + numRemoteBlocks + mergedLocalBlocks.size, + s"The number of non-empty blocks $blocksToFetchCurrentIteration doesn't equal to " + + s"the number of local blocks ${localBlocks.size} + " + + s"the number of host-local blocks ${hostLocalBlocksCurrentIteration.size} " + + s"the number of merged-local blocks ${mergedLocalBlocks.size} " + + s"+ the number of remote blocks ${numRemoteBlocks} ") + logInfo(s"[${context.taskAttemptId()}] Getting $blocksToFetchCurrentIteration " + Review comment: IIUC `info.get.id` = `$index.$attemptNumber` and the $index in not available in taskContext. I will just remove this change from the log. It is not related to push-based shuffle. Though it is helpful for debugging in general to have the TID logged here. -- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org