weizhouapache commented on a change in pull request #4708:
URL: https://github.com/apache/cloudstack/pull/4708#discussion_r709942050



##########
File path: 
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/KVMHAMonitor.java
##########
@@ -77,84 +92,148 @@ public NfsStoragePool getStoragePool(String uuid) {
         }
     }
 
-    private class Monitor extends ManagedContextRunnable {
-
-        @Override
-        protected void runInContext() {
-            synchronized (_storagePool) {
-                Set<String> removedPools = new HashSet<String>();
-                for (String uuid : _storagePool.keySet()) {
-                    NfsStoragePool primaryStoragePool = _storagePool.get(uuid);
+    protected class CheckPoolThread extends Thread {

Review comment:
       ManagedContextRunnable and Thread are both implemetation of Runnable 
interface.
   Thread works in testing. 
   
   ManagedContextRunnable should also be ok. The following might work as well
   ```
   protected class CheckPoolThread implements Runnable {
   ```




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


Reply via email to