smiklosovic commented on code in PR #4825:
URL: https://github.com/apache/cassandra/pull/4825#discussion_r3265505416


##########
src/java/org/apache/cassandra/db/ColumnFamilyStore.java:
##########
@@ -1026,12 +1025,21 @@ public Descriptor newSSTableDescriptor(File directory, 
SSTableFormat<?, ?> forma
 
     public Descriptor newSSTableDescriptor(File directory, Version version)
     {
-        Descriptor newDescriptor = new Descriptor(version,
-                                                  directory,
-                                                  getKeyspaceName(),
-                                                  name,
-                                                  sstableIdGenerator.get());
-        assert !newDescriptor.fileFor(Components.DATA).exists();
+        Descriptor newDescriptor;
+        while (true)

Review Comment:
   this might not happen in practice but it is worth saying that there is no 
limit as in how many times we loop, if there is some buggy ID supplier or we 
exhausted the namespace of these ids and all were on disk then we would spin 
for ever. Currently we have sequence based generator on integer and UUID 
generator on ... uuid, the namespace is pretty much "infinite" in practical 
terms so this we will not hit it, one would have to have like ~2 billions 
sstables on disk to exhaust (and then it would start to overflow)



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