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

split commitlog into header + mutations files

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 0.7 beta 1
    • None
    • None
    • Normal

    Description

      As mentioned in CASSANDRA-1119, it seems possible that a commitlog header could be corrupted by a power loss during update of the header, post-flush. We could try to make it more robust (by writing the size of the commitlogheader first, and skipping to the end if we encounter corruption) but it seems to me that the most foolproof method would be to split the log into two files: the header, which we'll overwrite, and the data, which is truly append only. If If the header is corrupt on reply, we just reply the data from the beginning; the header allows us to avoid replaying data redundantly, but it's strictly an optimization and not required for correctness.

      Attachments

        1. 1179-v2.txt
          22 kB
          Jonathan Ellis
        2. trunk-1179.txt
          15 kB
          Matthew F. Dennis
        3. trunk-1179-v3.txt
          23 kB
          Matthew F. Dennis
        4. trunk-1179-v4.txt
          29 kB
          Matthew F. Dennis

        Activity

          People

            mdennis Matthew F. Dennis
            jbellis Jonathan Ellis
            Matthew F. Dennis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: