turboFei commented on a change in pull request #28525:
URL: https://github.com/apache/spark/pull/28525#discussion_r428490170



##########
File path: 
core/src/main/scala/org/apache/spark/storage/ShuffleBlockFetcherIterator.scala
##########
@@ -626,16 +628,61 @@ final class ShuffleBlockFetcherIterator(
               buf.release()
               throwFetchFailedException(blockId, mapIndex, address, e)
           }
+
+          // If shuffle digest enabled is true, check the block with checkSum.
+          var failedOnDigestCheck = false
+          if (digestEnabled) {
+            if (digest >= 0) {
+              val digestToCheck = try {
+                DigestUtils.getDigest(in)
+              } catch {
+                case e: IOException =>
+                  logError("Error occurs when checking digest", e)
+                  buf.release()
+                  throwFetchFailedException(blockId, mapIndex, address, e)
+              }
+              failedOnDigestCheck = digest != digestToCheck
+              if (!failedOnDigestCheck) {

Review comment:
       thx




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to