GabrielCWT commented on code in PR #18591:
URL: https://github.com/apache/druid/pull/18591#discussion_r2418642914


##########
extensions-core/kubernetes-overlord-extensions/src/main/java/org/apache/druid/k8s/overlord/KubernetesTaskRunner.java:
##########
@@ -179,6 +189,24 @@ protected KubernetesWorkItem joinAsync(Task task)
     }
   }
 
+  private void syncCapacityWithDynamicConfig()

Review Comment:
   It is possible to make `currentCapacity` to be thread safe. 
   
   > Can we do this in a seperate thread instead of calling sync everywhere.
   
   This was an alternative solution though I am not sure if we are thinking of 
the same implementation. My solution was to have a thread which periodically 
checks whether there has been any changes to the capacity and update 
`currentCapacity` accordingly. However, I wasn't sure if it was a waste of 
resources as there would need to be a trade off between responsiveness (how 
quick will the changes be visible) and resources (since we need to wake the 
thread up every X seconds).



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