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

Cleanup can create sstables whose contents do not match their advertised version

Agile BoardAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 0.7.3
    • None
    • None
    • Normal

    Description

      Since cleanup switched to per-sstable operation (CASSANDRA-1916), the main loop looks like this:

                          if (Range.isTokenInRanges(row.getKey().token, ranges))
                          {
                              writer = maybeCreateWriter(sstable, compactionFileLocation, expectedBloomFilterSize, writer);
                              writer.append(new EchoedRow(row));
                              totalkeysWritten++;
                          }
                          else
                          {
                              while (row.hasNext())
                              {
                                  IColumn column = row.next();
                                  if (indexedColumns.contains(column.name()))
                                      Table.cleanupIndexEntry(cfs, row.getKey().key, column);
                              }
                          }
      

      ... that is, rows that haven't changed we copy to the new sstable without deserializing, with EchoedRow. But, the new sstable is created with CURRENT_VERSION which may not be what the old data consisted of.

      (This could cause symptoms similar to CASSANDRA-2195 but I do not think it is the cause of that bug; IIRC the cluster in question there was not upgraded from an older Cassandra.)

      Attachments

        1. 2211.txt
          5 kB
          Jonathan Ellis
        2. 2211-v2.txt
          3 kB
          Jonathan Ellis
        3. 0001-2211-v3.patch
          5 kB
          Sylvain Lebresne

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            jbellis Jonathan Ellis Assign to me
            jbellis Jonathan Ellis
            Jonathan Ellis
            Sylvain Lebresne
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 4h
                4h
                Remaining:
                Remaining Estimate - 4h
                4h
                Logged:
                Time Spent - Not Specified
                Not Specified

                Slack

                  Issue deployment