[ 
https://issues.apache.org/jira/browse/CASSANDRA-21133?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18053921#comment-18053921
 ] 

Stefan Miklosovic commented on CASSANDRA-21133:
-----------------------------------------------

 Worth to say that if sstableupgrade is executed while Cassandra is offline, 
there is no problem, because when Cassandra starts it will scan the disk and 
figures out what ID was the latest. This is problem only when offline execution 
via sstableupgrade is mixed together with Cassandra running.

I am not sure if the fact that sstableupgrade is run offline means that it 
automatically assumes that Cassandra node is offline as well. For now there is 
no such check in place. 

> bin/sstableupgrade is not functionally on par with nodetool upgradesstables
> ---------------------------------------------------------------------------
>
>                 Key: CASSANDRA-21133
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-21133
>             Project: Apache Cassandra
>          Issue Type: Improvement
>            Reporter: Stefan Miklosovic
>            Priority: Normal
>
> I am not sure if this is done on purpose or not but it seems to me that what 
> I can achieve with nodetool version can not be achieved with bin version of 
> SSTable upgrading.
> Nodetool version enables a user to specify "-a" flag which will include 
> SSTables even they are on the same version / format. 
> {code}
>     @Option(paramLabel = "include_all",
>             names = { "-a", "--include-all-sstables" },
>             description = "Use -a to include all sstables, even those already 
> on the current version")
>     private boolean includeAll = false;
> /// and later 
>         return performSSTableRewrite(cfs, (sstable) -> {
>             // Skip if descriptor version matches current version
>             if (skipIfCurrentVersion && 
> sstable.descriptor.version.equals(sstable.descriptor.getFormat().getLatestVersion()))
>                 return false;
> {code}
> On the other hand, bin/sstableupgrade does not make this possible:
> {code}
>                     SSTableReader sstable = 
> SSTableReader.openNoValidation(entry.getKey(), components, cfs);
>                     if 
> (sstable.descriptor.version.equals(DatabaseDescriptor.getSelectedSSTableFormat().getLatestVersion()))
>                     {
>                         sstable.selfRef().release();
>                         continue;
>                     }
>                     readers.add(sstable);
> {code}
> This might be viewed as a functional gap / discrepancy between these two. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to