szetszwo commented on PR #4688:
URL: https://github.com/apache/ozone/pull/4688#issuecomment-1551054977

   Indeed, we should use a nonblocking solution and not synchronize at all.  We 
probably need to redesign `LeaseManager`.
   
   BTW, the following code does not make sense at all.  Could a thread in dead 
state be started?  Probably not.
   ```java
   //LeaseManager.start()
       leaseMonitorThread.setUncaughtExceptionHandler((thread, throwable) -> {
         // Let us just restart this thread after logging an error.
         // if this thread is not running we cannot handle Lease expiry.
         LOG.error("LeaseMonitor thread encountered an error. Thread: {}",
             thread.toString(), throwable);
         leaseMonitorThread.start();
       });
   ```
   
   I suggest to commit this PR, if it can fix the test failures, and completely 
rewrite `LeaseManager` in the future.  @adoroszlai , would you like to trigger 
the test again?


-- 
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