diff --git a/pkg/scheduler/objects/node.go b/pkg/scheduler/objects/node.go index fcce3c7fb..86d8edba3 100644 --- a/pkg/scheduler/objects/node.go +++ b/pkg/scheduler/objects/node.go @@ -262,8 +262,8 @@ func (sn *Node) GetAllocatedResource() *resources.Resource { // Get the available resource on this node. func (sn *Node) GetAvailableResource() *resources.Resource { - sn.Lock() - defer sn.Unlock() + sn.RLock() + defer sn.RUnlock() return sn.availableResource.Clone() }