smiklosovic commented on code in PR #4100: URL: https://github.com/apache/cassandra/pull/4100#discussion_r2048454521
########## src/java/org/apache/cassandra/service/snapshot/TakeSnapshotTask.java: ########## @@ -163,7 +164,15 @@ private void createSnapshot(ColumnFamilyStore cfs, TableSnapshot snapshotToCreat for (SSTableReader ssTable : currentView.sstables) { File snapshotDirectory = Directories.getSnapshotDirectory(ssTable.descriptor, snapshotName); - ssTable.createLinks(snapshotDirectory.path(), options.rateLimiter); // hard links + try + { + ssTable.createLinks(snapshotDirectory.path(), options.rateLimiter); // hard links + } + catch (DuplicateHardlinkException ex) + { + if (!options.force) + throw ex; Review Comment: ok to throw DHE here, what will be eventually thrown is RTE thanks to CASSANDRA-20335 -- 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: pr-unsubscr...@cassandra.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org For additional commands, e-mail: pr-h...@cassandra.apache.org