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

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Fix Version/s: 1.2.13, 2.0.4
    • Component/s: None
    • Labels:
    • Severity:
      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

          Activity

            People

            • Assignee:
              yukim Yuki Morishita
              Reporter:
              jjordan Jeremiah Jordan
              Authors:
              Yuki Morishita
              Reviewers:
              Jonathan Ellis
            • Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: