smiklosovic commented on code in PR #4825:
URL: https://github.com/apache/cassandra/pull/4825#discussion_r3265469134
##########
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)
+ {
+ newDescriptor = new Descriptor(version,
+ directory,
+ getKeyspaceName(),
+ name,
+ sstableIdGenerator.get());
+
+ if (!newDescriptor.fileFor(Components.DATA).exists())
+ break;
+
+ logger.warn("Generated SSTable id {} collides with existing file;
advancing.", newDescriptor.id);
Review Comment:
I would change this just to debug. This is not something a user can act on
anyway
--
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]