smiklosovic commented on a change in pull request #875:
URL: https://github.com/apache/cassandra/pull/875#discussion_r580876931
##########
File path: src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java
##########
@@ -2276,8 +2276,24 @@ public static SSTableReader
moveAndOpenSSTable(ColumnFamilyStore cfs, Descriptor
throw new RuntimeException(msg);
}
- logger.info("Renaming new SSTable {} to {}", oldDescriptor,
newDescriptor);
- SSTableWriter.rename(oldDescriptor, newDescriptor, components);
+ if (copyData)
+ {
+ try
+ {
+ logger.info("Hardlinking new SSTable {} to {}", oldDescriptor,
newDescriptor);
+ SSTableWriter.hardlink(oldDescriptor, newDescriptor,
components);
+ }
+ catch (Throwable t)
Review comment:
@krummas but that is the point, because in that catch block I am copying
SSTables instead of hardlinking them. If I rethrow, how will I fall back to
copy then?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]