Vladsz83 commented on code in PR #13577:
URL: https://github.com/apache/ignite/pull/13577#discussion_r4298496096


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IncrementalSnapshotProcessor.java:
##########
@@ -138,7 +138,8 @@ void process(
 
                 WALRecord rec = walRec.getValue();
 
-                if (rec.type() == CLUSTER_SNAPSHOT && 
((ClusterSnapshotRecord)rec).clusterSnapshotName().equals(sft.name())) {
+                // A filesystem might not support the character case of 
directory or file name.
+                if (rec.type() == CLUSTER_SNAPSHOT && 
((ClusterSnapshotRecord)rec).clusterSnapshotName().equalsIgnoreCase(sft.name()))
 {

Review Comment:
   I’d like to say that I found this on my own, but a test did this. If we 
remove this change, the test 
`IgniteClusterSnapshotDeleteTest#testSnapshotDeleteWhenCheckInProgress()` will 
fail:
   ```
   [ERROR][main][] Test failed 
[test=IgniteClusterSnapshotDeleteTest#testSnapshotDeleteWhenCheckInProgress[encryption=false,
 onlyPrimary=false, incremental=true], duration=3686]
   
   java.lang.AssertionError
        at 
org.apache.ignite.testframework.junits.JUnitAssertAware.assertTrue(JUnitAssertAware.java:35)
        at 
org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteClusterSnapshotDeleteTest.testSnapshotDeleteWhenCheckInProgress(IgniteClusterSnapshotDeleteTest.java:690)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   ```
   if launched with the parameter `IgniteClusterSnapshotDeleteTest#incremental` 
== `true` on Windows (`caseInsensitiveFs` is `true`).
   
   The exception arises on all the nodes:
   
   ```
   class org.apache.ignite.IgniteException: System WAL record for full snapshot 
wasn't found [snpName=testsnapshot, 
walSegFile=...\ignite\work\snapshots\testsnapshot\increments\0000000000000001\db\wal\snapshot_IgniteClusterSnapshotDeleteTest0\0000000000000000.wal.zip]
   
   ```
   
   The problem is that 
   `ClusterSnapshotRecord#clusterSnapshotName()` is `testSnapshot` while 
`sft.name()` is `testsnapshot`. But it is just a user-passed parameter and 
doesn't matter when is `caseInsensitiveFs` is `false` and does really work.



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