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

Secondary index creation causes moves/bootstraps to fail

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Fix Version/s: None
    • Component/s: Feature/2i Index
    • Labels:
      None
    • Severity:
      Normal

      Description

      Node moves/bootstraps are failing if the stream timeout is set to a value in which secondary index creation cannot complete. This happens because at the end of the very last stream the StreamInSession.closeIfFinished() function calls maybeBuildSecondaryIndexes on every column family. If the stream time + all CF's index creation takes longer than your stream timeout then the socket closes from the sender's side, the receiver of the stream tries to write to said socket because it's not null, an IOException is thrown but not caught in closeIfFinished(), the exception is caught somewhere and not logged, AbstractStreamSession.close() is never called, and the CountDownLatch is never decremented. This causes the move/bootstrap to continue forever until the node is restarted.

      This problem of stream time + secondary index creation time exists on decommissioning/unbootstrap as well but since it's on the sending side the timeout triggers the onFailure() callback which does decrement the CountDownLatch leading to completion.

      A cursory glance at the 2.0 code leads me to believe this problem would exist there as well.

      Temporary workaround: set a really high/infinite stream timeout.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                pauloricardomg Paulo Motta (Deprecated)
                Reporter:
                blafrisch Michael Frisch
                Authors:
                Paulo Motta (Deprecated)
                Reviewers:
                Yuki Morishita
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: