Peter Bacsko created YUNIKORN-2233:
--------------------------------------

             Summary: Lot of core objects instances cannot be stopped
                 Key: YUNIKORN-2233
                 URL: https://issues.apache.org/jira/browse/YUNIKORN-2233
             Project: Apache YuniKorn
          Issue Type: Improvement
          Components: core - scheduler
            Reporter: Peter Bacsko
            Assignee: Peter Bacsko


Once we have a {{Scheduler}}, {{RMProxy}}, {{HealthChecker}}, 
{{internalMetricsCollector}}, etc. objects initialized, there's no way to stop 
the background goroutines started by them. This isn't necessarily a problem in 
a real environment, because restarting the scheduler core on its own is not a 
requirement. 

However, in the tests which use {{MockScheduler}}, we don't want goroutines to 
keep running and consume memory. Therefore, we a need a proper {{Stop()}} 
method on the most relevant types to make sure that the stop signal propagates 
to all goroutines.

Attached screenshot shows what happens after we call {{MockScheduler.Stop()}} 
in the core (it's very similar to the {{MockScheduler}} in the shim). 
Goroutines are still running from the following types:
* {{Scheduler}}
* {{nodesResourceUsageMonitor}}
* {{HealthChecker}}
* {{RMProxy}}
* {{EventSystemImpl}}
* {{partitionManager}}
* {{internalMetricsCollector}}




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to