surahman commented on PR #412: URL: https://github.com/apache/yunikorn-core/pull/412#issuecomment-1133185950
### REST runtime `Config` updates Updating the `Config` object should not represent an issue. [`updateClusterConfig`](https://github.com/apache/yunikorn-core/blob/d81bf72c9fcdf5255816194d0d2ad68d7d3d69a7/pkg/webservice/handlers.go#L434) will generate the parsed updated `Config` into a struct and then reading/updating values is straight forward. The issue arises with the `HealthCheck` daemon process and updating its setting. I was unable to find another daemon process which allows its configuration updated via the `Config`. The following is my proposed solution after a brief look: 1. Load and read the `enabled` and `interval` directly from the `Config` instead of the local data structure whenever needed. My concern with this is performance. Would it be significantly slower to get and read from `Config` compared to data members in the object? 2. The [`HealthChecker`](https://github.com/apache/yunikorn-core/blob/3160880808aa11384afa457e047335387d0f00f6/pkg/scheduler/health_checker.go#L91-L92) process would need to run and poll the `Config` for updates periodically. `runOnce` would not execute if `enabled=false`. 3. Another `interval` setting for the daemon to poll the `Config` for updates? 4. [`stop`](https://github.com/apache/yunikorn-core/blob/3160880808aa11384afa457e047335387d0f00f6/pkg/scheduler/health_checker.go#L98) will remain as it initially was because the `HealthCheck` daemon process will consistently be running. 5. I am unsure if the primary purpose of disabling the `HealthCheck` was for performance/overhead but only running the daemon would be lightweight. -- 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]
