Vladsz83 commented on a change in pull request #9269:
URL: https://github.com/apache/ignite/pull/9269#discussion_r687922015



##########
File path: 
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteClusterSnapshotCheckTest.java
##########
@@ -554,6 +566,77 @@ public void testClusterSnapshotCheckMultipleTimes() throws 
Exception {
         assertTrue("Threads created: " + createdThreads, createdThreads < 
iterations);
     }
 
+    /** Checks bytes, signature of partion files. Compares before and after 
snapshot. Assumes the files are equal.  */
+    @Test
+    public void testSnapshotLocalPartitions() throws Exception {
+        // Note: this test is valid only for not-encrypted snapshots. Writting 
snapshots deltas causes several page writes into file.
+        // Every page write calls encrypt(). Every repatable encrypt() 
produces different record (different bytes) even for same original
+        // data. Re-writting pages from delta to partition file in the 
shanpshot leads to additional encryption before writting to the
+        // snapshot partition file. Thus, page in original partition and in 
snapshot partiton has different encrypted CRC and same
+        // de-crypted CRC. Different encrypted CRC looks like different data 
in point of view of third-party observer.

Review comment:
       Because this test compares partition files, not the data. The data is 
checked in manyplases after snapshot like `assertSnapshotCacheKeys()`




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