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

BootstrapMonitor.progress does not store all error messages

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Normal
    • Resolution: Unresolved
    • 5.x
    • Legacy/Tools
    • Normal
    • Low Hanging Fruit

    Description

      The BootstrapMonitor.progress ignores error messages when an error is ProgressEventType.ERROR. Indeed, RepairRunner.progress once had a similar bug, but is fixed. The fixed code is:

       public void progress(String tag, ProgressEvent event)
          {
              ProgressEventType type = event.getType();
              String message = String.format("[%s] %s", format.format(System.currentTimeMillis()), event.getMessage());
              if (type == ProgressEventType.PROGRESS)
              {
                  message = message + " (progress: " + (int)event.getProgressPercentage() + "%)";
              }
              out.println(message);
              if (type == ProgressEventType.ERROR)
              {
                  error = new RuntimeException("Repair job has failed with the error message: " + message);
              }
              if (type == ProgressEventType.COMPLETE)
              {
                  condition.signalAll();
              }
          }
      

      Please refer to CASSANDRA-12508 for details.

      Attachments

        1. cassandra.patch
          0.7 kB
          Hao Zhong

        Activity

          People

            haozhong Hao Zhong
            haozhong Hao Zhong
            Hao Zhong
            Paulo Motta
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: