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

Double-check or replace RRW memtable lock

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

Details

    • Improvement
    • Status: Resolved
    • Low
    • Resolution: Later
    • None
    • None
    • None

    Description

      ...when a Memtable reaches its threshold, up to (all) N write threads will often notice, and race to acquire the writeLock in order to freeze the memtable. This means that we do way more writeLock acquisitions than we need to...

      See CASSANDRA-1930 for backstory, but adding double checking inside a read lock before trying to re-entrantly acquire the writelock would eliminate most of these excess writelock acquisitions.

      Alternatively, we should explore removing locking from these structures entirely, and replacing the writeLock acquisition with a per-memtable counter of active threads.

      Attachments

        1. 0001-Double-check-in-maybeSwitchMemtable-to-minimize-writeL.txt
          2 kB
          Stu Hood
        2. 0001-Remove-flusherLock-readLock.patch
          24 kB
          Sylvain Lebresne
        3. 1954-v2.txt
          23 kB
          Jonathan Ellis
        4. 1954_trunk.patch
          20 kB
          Sylvain Lebresne
        5. 1954-0.7-v2.txt
          2 kB
          Jonathan Ellis

        Issue Links

        Activity

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

          People

            Unassigned Unassigned Assign to me
            stuhood Stu Hood
            Jonathan Ellis
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

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

                Slack

                  Issue deployment