anmolanmol1234 commented on code in PR #7853: URL: https://github.com/apache/hadoop/pull/7853#discussion_r2262094329
########## hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsBlobClient.java: ########## @@ -1103,8 +1107,21 @@ public AbfsRestOperation flush(byte[] buffer, AbfsRestOperation op1 = getPathStatus(path, true, tracingContext, contextEncryptionAdapter); String metadataMd5 = op1.getResult().getResponseHeader(CONTENT_MD5); - if (blobMd5 != null && !blobMd5.equals(metadataMd5)) { - throw ex; + /* + * Validate the response by comparing the server's MD5 metadata against either: + * 1. The full blob content MD5 (if full blob checksum validation is enabled), or + * 2. The full block ID buffer MD5 (fallback if blob checksum validation is disabled) + */ + if (getAbfsConfiguration().isFullBlobChecksumValidationEnabled() && blobMd5 != null) { + // Full blob content MD5 mismatch — integrity check failed + if (!blobMd5.equals(metadataMd5)) { Review Comment: The way in which the 2 md5 are computed are different, blobMd5 computes the entire blob data's md5 while md5Hash is used only for the md5 computation of the list of blockId's and hence we are maintaining 2 separate variables. -- 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: common-issues-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org