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

Streaming (2.0) can deadlock

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 2.0 beta 1
    • None
    • None
    • Normal

    Description

      The new streaming implementation (CASSANDRA-5286) creates 2 threads per host for streaming, one for the incoming stream and one for the outgoing one. However, both currently share the same socket, but since we use synchronous I/O, a read can block a write, which can result in a deadlock if 2 nodes are both blocking on a read a the same time, thus blocking their respective writes (this is actually fairly easy to reproduce with a simple repair).

      So instead attaching a patch that uses one socket per thread.

      The patch also correct the stream throughput throttling calculation that was 8000 times lower than what it should be.

      Attachments

        1. 5699.txt
          49 kB
          Sylvain Lebresne

        Activity

          People

            slebresne Sylvain Lebresne
            slebresne Sylvain Lebresne
            Sylvain Lebresne
            Jonathan Ellis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: