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

Fix potential race condition in IndexViewManager during invalidation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 5.0-beta1, 5.0, 5.1
    • Feature/SAI
    • None

    Description

      There is a potential race condition in the IndexViewManager.invalidate method:

      public void invalidate()
      {
          View currentView = view.get();
      
          for (SSTableIndex index : currentView)
          {
              index.markObsolete();
          }
      
          view.set(new View(context, Collections.emptyList()));
      } 

      We should getAndSet the view before marking the indexes as obsolete. This would avoid indexes potentially being made obsolete when being accessed. 

      Attachments

        Issue Links

          Activity

            People

              mike_tr_adamson Mike Adamson
              mike_tr_adamson Mike Adamson
              Mike Adamson
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: