maedhroz commented on code in PR #4696:
URL: https://github.com/apache/cassandra/pull/4696#discussion_r3024556492


##########
src/java/org/apache/cassandra/db/lifecycle/Tracker.java:
##########
@@ -272,7 +273,11 @@ public void 
updateInitialSSTableSize(Iterable<SSTableReader> sstables)
 
     public void addSSTables(Collection<SSTableReader> sstables)
     {
-        
Preconditions.checkState(!cfstore.metadata().replicationType().isTracked());
+        // Tracked tables may legitimately use this path during migration from 
untracked to tracked,
+        // when incremental repair streams SSTables that were written before 
tracking was enabled.
+        
Preconditions.checkState(!cfstore.metadata().replicationType().isTracked()
+                                 || 
ClusterMetadata.current().mutationTrackingMigrationState
+                                    
.getKeyspaceInfo(cfstore.metadata().keyspace) != null);

Review Comment:
   nit: Might be nice to have something like an `isMigrating(String)` on MTMS, 
but just a matter of taste I guess.



-- 
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]

Reply via email to