maedhroz commented on code in PR #4428:
URL: https://github.com/apache/cassandra/pull/4428#discussion_r2535937425
##########
src/java/org/apache/cassandra/db/SSTableImporter.java:
##########
@@ -183,7 +181,14 @@ synchronized List<String> importNewSSTables(Options
options)
Descriptor newDescriptor =
cfs.getUniqueDescriptorFor(entry.getKey(), targetDir);
maybeMutateMetadata(entry.getKey(), options);
movedSSTables.add(new MovedSSTable(newDescriptor,
entry.getKey(), entry.getValue()));
- SSTableReader sstable =
SSTableReader.moveAndOpenSSTable(cfs, entry.getKey(), newDescriptor,
entry.getValue(), options.copyData);
+ SSTableReader sstable;
+ // Don't move tracked SSTables, since that will move them
to the live set on bounce
+ if (isTracked)
+ sstable = SSTableReader.open(cfs, oldDescriptor,
metadata.ref);
+ else
+ {
+ sstable = SSTableReader.moveAndOpenSSTable(cfs,
oldDescriptor, newDescriptor, entry.getValue(), options.copyData);
+ }
Review Comment:
How would this look as a ternary?
```
SSTableReader sstable = isTracked // Don't move tracked SSTables, since that
will move them to the live set on bounce
? SSTableReader.open(cfs, oldDescriptor,
metadata.ref)
: SSTableReader.moveAndOpenSSTable(cfs,
oldDescriptor, newDescriptor, entry.getValue(), options.copyData);
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]