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

Compaction deletes ExpiringColumns in Secondary Indexes

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Normal

    Description

      From this discussion http://www.mail-archive.com/user@cassandra.apache.org/msg26599.html

      CompactionManager.getDefaultGcBefore() set's the gc_before to be Integer.MAX_VALUE.

      In the example all entries in the secondary index have a TTL. In PreCompactedRow.removeDeletedAndOldShards() the CF is determined to have irrelevant data, the call to CFS.removeDeleted() results in the ExpiringColumns being removed and the row is treated as empty. CompactionTask.execute() exits at the if (!nni.hasNext()) test, so the sstables are marked as compacted and soon deleted.

      In the example the localDeletionTime was Thu, 21 Mar 2013 08:25:22 GMT and should not have been purged.

      In the example when the first compaction on the secondary index runs the on disk data for the index is deleted. The logs show a compaction starting and no associated "Compacted to" message from that compaction thread.

      The impact is incorrect results from secondary indexes queries.

      Attachments

        Issue Links

        Activity

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

          People

            amorton Aaron Morton Assign to me
            amorton Aaron Morton
            Aaron Morton
            Sylvain Lebresne
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment