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

Race condition in AbstractReplicationStrategy.getNaturalReplicas

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

Details

    • Availability - Unavailable
    • Low
    • Normal
    • Code Inspection

    Description

      There is a very narrow and infrequent race window, in which two ring updates occur in a short space of time (or during an interval of no queries):

      • thread A invalidates the cache after the first ring change, snapshots this version of the ring, and begins to calculate its natural endpoints
      • thread B sees the second ring change, and invalidates the cache before thread A completes
      • thread A writes its value to the cache, based on the old ring layout

      Now, a stale view of the endpoints for this token will be persisted in AbstractReplicationStrategy until the next ring change (which may feasibly never occur)

      Attachments

        Activity

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

          People

            Unassigned Unassigned Assign to me
            benedict Benedict Elliott Smith

            Dates

              Created:
              Updated:

              Slack

                Issue deployment