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

ReadResponseResolver Race

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 0.7.6, 0.8.0 beta 2
    • None
    • None
    • Normal

    Description

      When receiving a response, ReadResponseResolver uses a 3 step process to decide whether to trigger the condition that enough responses have arrived:

      1. Add new response
      2. Check response set size
      3. Check that data is present

      I think that these steps must have been reordered by the compiler in some cases, because I was able to reproduce a case for a QUORUM read where the condition is not properly triggered:

      INFO [RequestResponseStage:15] 2011-04-25 00:26:53,514 ReadResponseResolver.java (line 87) post append for 1087367065: hasData=false in 2 messages
      INFO [RequestResponseStage:8] 2011-04-25 00:26:53,514 ReadResponseResolver.java (line 87) post append for 1087367065: hasData=true in 1 messages
      INFO [pool-1-thread-54] 2011-04-25 00:27:03,516 StorageProxy.java (line 623) Read timeout: java.util.concurrent.TimeoutException: ReadResponseResolver@1087367065(/10.34.131.109=false,/10.34.132.122=true,)
      

      The last line shows that both results were present, and that one of them was holding data.

      Attachments

        1. ResolveRaceTest.java
          4 kB
          Stu Hood
        2. 0001-Move-Resolvers-to-atomic-append-count.txt
          24 kB
          Stu Hood
        3. 2552-v2.txt
          9 kB
          Jonathan Ellis
        4. 2552-v2-07.txt
          9 kB
          Jonathan Ellis

        Activity

          People

            jbellis Jonathan Ellis
            stuhood Stu Hood
            Jonathan Ellis
            Stu Hood
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: