Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-20146

Check presence of a snapshot in a case-insensitive manner on macOS platform to prevent hardlinking failures

    XMLWordPrintableJSON

Details

    Description

      It looks like snapshot names are perhaps not case-sensitive, and there is a collision between "snapshot" and "Snapshot". In the logs, I see this when I run testExoticSnapshotNames():

      WARN  16:45:44 Unable to create snapshot Snapshot for distributed_test_keyspace.tbl
      java.lang.RuntimeException: Tried to create duplicate hard link to /private/var/folders/4d/zfjs7m7s6x5_l93k33r5k6680000gn/T/dtests17605712756058855626/node1/data2/distributed_test_keyspace/tbl-1b255f4def2540a60000000000000005/snapshots/Snapshot/oa-3-big-Data.db
      	at org.apache.cassandra.io.util.FileUtils.createHardLink(FileUtils.java:174)
      	at org.apache.cassandra.io.sstable.format.SSTableReader.createLinks(SSTableReader.java:1114)
      	at org.apache.cassandra.io.sstable.format.SSTableReader.createLinks(SSTableReader.java:1096)
      	at org.apache.cassandra.service.snapshot.TakeSnapshotTask.createSnapshot(TakeSnapshotTask.java:166)
      	at org.apache.cassandra.service.snapshot.TakeSnapshotTask.call(TakeSnapshotTask.java:140)
      	at org.apache.cassandra.service.snapshot.SnapshotManager.executeTask(SnapshotManager.java:526)
      	at org.apache.cassandra.service.snapshot.SnapshotManager.takeSnapshot(SnapshotManager.java:419)
      	at org.apache.cassandra.service.snapshot.SnapshotManager.takeSnapshot(SnapshotManager.java:435)
      	at org.apache.cassandra.tools.NodeProbe.takeMultipleTableSnapshot(NodeProbe.java:933)
      	at org.apache.cassandra.tools.nodetool.Snapshot.execute(Snapshot.java:97)
      	at org.apache.cassandra.tools.NodeTool$NodeToolCmd.runInternal(NodeTool.java:393)
      	at org.apache.cassandra.tools.NodeTool$NodeToolCmd.run(NodeTool.java:378)
      	at org.apache.cassandra.tools.NodeTool.execute(NodeTool.java:277)
      

      Attachments

        Issue Links

          Activity

            People

              smiklosovic Stefan Miklosovic
              maedhroz Caleb Rackliffe
              Stefan Miklosovic
              Bernardo Botella, Caleb Rackliffe
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h