Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-14349

Untracked CDC segment files are not deleted after replay

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Ready to Commit
    • Priority: Low
    • Resolution: Unresolved
    • Fix Version/s: None
    • Labels:
      None
    • Severity:
      Low
    • Since Version:
      4.0

      Description

      When CDC is enabled, a hard link to each commit log file will be created in cdc_raw directory. Those commit logs with CDC mutations will also have cdc index files created along with the hard links; these are intended for the consumer to handle and clean them up.

      However, if we don't produce any CDC traffic, those hard links in cdc_raw will be never cleaned up (because hard links will still be created, without the index files), whereas the real original commit logs are correctly deleted after replay during process startup. This will results in many untracked hard links in cdc_raw if we restart the cassandra process many times. I am able to use CCM to reproduce it in trunk version which has the CASSANDRA-12148 changes.

      This seems a bug in handleReplayedSegment of the commit log segment manager which neglects to take care of CDC commit logs. I will attach a patch here.

        Attachments

          Activity

            People

            • Assignee:
              shichao.an Shichao An
              Reporter:
              shichao.an Shichao An
              Authors:
              Shichao An
              Reviewers:
              Joshua McKenzie
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated: