yifan-c commented on a change in pull request #1311:
URL: https://github.com/apache/cassandra/pull/1311#discussion_r759894138



##########
File path: 
src/java/org/apache/cassandra/db/commitlog/CommitLogSegmentManagerCDC.java
##########
@@ -78,11 +81,45 @@ public void discard(CommitLogSegment segment, boolean 
delete)
                 FileUtils.deleteWithConfirm(cdcLink);
 
             File cdcIndexFile = segment.getCDCIndexFile();
-            if (cdcIndexFile.exists())
-                FileUtils.deleteWithConfirm(cdcIndexFile);
+            deleteCDCFiles(cdcLink, cdcIndexFile);
         }
     }
 
+    /**
+     * Delete the oldest CDC commit log segment to free up space.
+     * @return total deleted file size in bytes
+     */
+    public long deleteOldestCommitLogSegment()

Review comment:
       👍 Sure. Let's rename the method to add clarity. I probably omitted "CDC" 
for it is in the  `CommitLogSegmentManagerCDC` class. 




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