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

Snapshot repair blocks for ever if something happens to the "I made my snapshot" response

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 1.2.13, 2.0.4
    • None
    • Normal

    Description

      The "snapshotLatch.await();" can be waiting for ever and block all repair operations indefinitely if something happens that another node doesn't respond.

                  public void makeSnapshots(Collection<InetAddress> endpoints)
                  {
                      try
                      {
                          snapshotLatch = new CountDownLatch(endpoints.size());
                          IAsyncCallback callback = new IAsyncCallback()
                          {
                              public boolean isLatencyForSnitch()
                              {
                                  return false;
                              }
      
                              public void response(MessageIn msg)
                              {
                                  RepairJob.this.snapshotLatch.countDown();
                              }
                          };
                          for (InetAddress endpoint : endpoints)
                              MessagingService.instance().sendRR(new SnapshotCommand(tablename, cfname, sessionName, false).createMessage(), endpoint, callback);
                          snapshotLatch.await();
                          snapshotLatch = null;
                      }
                      catch (InterruptedException e)
                      {
                          throw new RuntimeException(e);
                      }
                  }
      

      Attachments

        1. 6415-1.2.txt
          1 kB
          Yuki Morishita

        Issue Links

          Activity

            People

              yukim Yuki Morishita
              jjordan Jeremiah Jordan
              Yuki Morishita
              Jonathan Ellis
              Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: