Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-4656 Add a container balancer tool or service for HDDS
  3. HDDS-5671

ContainerBalancer#stop should prevent the current balancing thread from interrupting itself.

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 1.3.0
    • SCM

    Description

      If the current thread calls the ContainerBalancer#stop method, it ends up calling interrupt and join on itself.

      ContainerBalancer#stop
      balancerRunning = false;
      currentBalancingThread.interrupt();
      currentBalancingThread.join(1000);
      

      This causes:

      [ContainerBalancer] WARN balancer.ContainerBalancer (ContainerBalancer.java:stop(731)) - Interrupted while waiting for balancing thread to join.
      [ContainerBalancer] INFO balancer.ContainerBalancer (ContainerBalancer.java:stop(736)) - Container Balancer stopped successfully.

      The current thread should be prevented from interrupting itself. The interrupt and join calls are required when ContainerBalancer#stop has been called from a different thread and balancer needs to stop gracefully.

      Attachments

        Issue Links

          Activity

            People

              siddhant Siddhant Sangwan
              siddhant Siddhant Sangwan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: