wilfred-s commented on a change in pull request #370:
URL:
https://github.com/apache/incubator-yunikorn-core/pull/370#discussion_r813537546
##########
File path: pkg/scheduler/context.go
##########
@@ -640,10 +661,21 @@ func (cc *ClusterContext) updateNode(nodeInfo
*si.NodeInfo) {
case si.NodeInfo_DRAIN_NODE:
// set the state to not schedulable
node.SetSchedulable(false)
+ metrics.GetSchedulerMetrics().IncDrainingNodes()
Review comment:
oops, I overlooked an error here I think: if the node is already
draining we should not increment again and we do not need to change state:
```
if node.IsSchedulable() {
node.SetSchedulable(false)
metrics.GetSchedulerMetrics().IncDrainingNodes()
}
```
this is handled the other way around
--
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]