You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2021/12/01 06:45:39 UTC

[GitHub] [cassandra] yifan-c commented on a change in pull request #1311: CASSANDRA-17001: Optionally prune CDC segments if consumer fails to consume them fast enough

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

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



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