xyuanlu opened a new issue, #2577:
URL: https://github.com/apache/helix/issues/2577

   ### Describe the bug
   While running chaos tests for metaclient, we notice sometimes puppy 
implementation hang after test finish.
   This is because we only catch interrupt exception while `sleep()` but not 
when `bark()`.
   
   `public void run() {
       try {
         while (true) {
           try {
             bark();
           } catch (Exception e) {
             incrementUnhandledErrorCounter();
             e.printStackTrace();
           }
   
           if (getPuppySpec().getMode() == PuppyMode.ONE_OFF) {
             cleanup();
             break;
           } else {
             try {
               Thread.sleep(getPuppySpec().getExecDelay().getNextDelay());
             } catch (InterruptedException e) {
               cleanup();
               break;
               // Handle interruption if necessary
             }
           }
         }
       } catch (Exception e) {
         e.printStackTrace();
       }
     }`
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to