arvindKandpal-ksolves commented on code in PR #4825:
URL: https://github.com/apache/cassandra/pull/4825#discussion_r3271553581
##########
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:
Yes, exactly. The atomic increment takes care of thread safety in-process.
I've added a comment above the while(true) loop to explain that this is purely
a defense against offline tool generation.
--
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]