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


##########
src/java/org/apache/cassandra/io/sstable/format/TOCComponent.java:
##########
@@ -123,13 +152,12 @@ public static Set<Component> loadOrCreate(Descriptor 
descriptor)
     }
 
     /**
-     * Rewrite TOC components by deleting existing TOC file and append new 
components
+     * Rewrites the TOC component by deleting and recreating it only with 
provided component names.
      */
     public static void rewriteTOC(Descriptor descriptor, Collection<Component> 
components)
     {
         File tocFile = descriptor.fileFor(Components.TOC);
-        if (!tocFile.tryDelete())
-            logger.error("Failed to delete TOC component for " + descriptor);
-        appendTOC(descriptor, components);
+        if (!tocFile.tryDelete()) logger.error("Failed to delete TOC component 
for {}", descriptor);

Review Comment:
   not necessary, just return it to what it was. There is 0 changes in here.



-- 
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: pr-unsubscr...@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org
For additional commands, e-mail: pr-h...@cassandra.apache.org

Reply via email to