shekhars-li commented on code in PR #1684:
URL: https://github.com/apache/samza/pull/1684#discussion_r1302338106


##########
samza-core/src/main/java/org/apache/samza/storage/blobstore/util/DirDiffUtil.java:
##########
@@ -168,11 +171,17 @@ public static BiPredicate<File, FileIndex> 
areSameFile(boolean compareLargeFileC
 
           // Don't compare file timestamps. The ctime of a local file just 
restored will be different than the
           // remote file, and will cause the file to be uploaded again during 
the first commit after restore.
-          areSameFiles = localFileAttrs.size() == remoteFileMetadata.getSize() 
&&
-              
groupCache.get(String.valueOf(Files.getAttribute(localFile.toPath(), 
"unix:gid")),
-                () -> 
localFileAttrs.group().getName()).equals(remoteFileMetadata.getGroup()) &&
-              
ownerCache.get(String.valueOf(Files.getAttribute(localFile.toPath(), 
"unix:uid")),
-                () -> 
localFileAttrs.owner().getName()).equals(remoteFileMetadata.getOwner());
+          areSameFiles = localFileAttrs.size() == remoteFileMetadata.getSize();

Review Comment:
   RocksDB provides a guarantee that sst files of same names are same files and 
if the file names are different, their contents are definitely different as 
well.
   Given that, this is just a sanity check to ensure that the files are same. 
This is, for example, checked after restore to make sure all the chunks of the 
blobs are actually downloaded. BTW we always re-download non-sst files, so this 
is not an issue for them.



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