Skip to content

Commit

Permalink
scheduler: Add non-preemptible Request in quotaInfo's QuotaCalculateI…
Browse files Browse the repository at this point in the history
…nfo (#1755)

Signed-off-by: xulinfei.xlf <xulinfei.xlf@alibaba-inc.com>
Co-authored-by: xulinfei.xlf <xulinfei.xlf@alibaba-inc.com>
  • Loading branch information
xulinfei1996 and xulinfei.xlf committed Nov 24, 2023
1 parent 9f9557e commit 661dd71
Show file tree
Hide file tree
Showing 7 changed files with 273 additions and 146 deletions.
68 changes: 45 additions & 23 deletions apis/extension/elastic_quota.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,29 +27,31 @@ import (

// RootQuotaName means quotaTree's root\head.
const (
SystemQuotaName = "koordinator-system-quota"
RootQuotaName = "koordinator-root-quota"
DefaultQuotaName = "koordinator-default-quota"
QuotaKoordinatorPrefix = "quota.scheduling.koordinator.sh"
LabelQuotaIsParent = QuotaKoordinatorPrefix + "/is-parent"
LabelQuotaParent = QuotaKoordinatorPrefix + "/parent"
LabelAllowLentResource = QuotaKoordinatorPrefix + "/allow-lent-resource"
LabelQuotaName = QuotaKoordinatorPrefix + "/name"
LabelQuotaProfile = QuotaKoordinatorPrefix + "/profile"
LabelQuotaIsRoot = QuotaKoordinatorPrefix + "/is-root"
LabelQuotaTreeID = QuotaKoordinatorPrefix + "/tree-id"
LabelQuotaIgnoreDefaultTree = QuotaKoordinatorPrefix + "/ignore-default-tree"
LabelPreemptible = QuotaKoordinatorPrefix + "/preemptible"
LabelAllowForceUpdate = QuotaKoordinatorPrefix + "/allow-force-update"
AnnotationSharedWeight = QuotaKoordinatorPrefix + "/shared-weight"
AnnotationRuntime = QuotaKoordinatorPrefix + "/runtime"
AnnotationRequest = QuotaKoordinatorPrefix + "/request"
AnnotationChildRequest = QuotaKoordinatorPrefix + "/child-request"
AnnotationResourceKeys = QuotaKoordinatorPrefix + "/resource-keys"
AnnotationTotalResource = QuotaKoordinatorPrefix + "/total-resource"
AnnotationQuotaNamespaces = QuotaKoordinatorPrefix + "/namespaces"
AnnotationGuaranteed = QuotaKoordinatorPrefix + "/guaranteed"
AnnotationAllocated = QuotaKoordinatorPrefix + "/allocated"
SystemQuotaName = "koordinator-system-quota"
RootQuotaName = "koordinator-root-quota"
DefaultQuotaName = "koordinator-default-quota"
QuotaKoordinatorPrefix = "quota.scheduling.koordinator.sh"
LabelQuotaIsParent = QuotaKoordinatorPrefix + "/is-parent"
LabelQuotaParent = QuotaKoordinatorPrefix + "/parent"
LabelAllowLentResource = QuotaKoordinatorPrefix + "/allow-lent-resource"
LabelQuotaName = QuotaKoordinatorPrefix + "/name"
LabelQuotaProfile = QuotaKoordinatorPrefix + "/profile"
LabelQuotaIsRoot = QuotaKoordinatorPrefix + "/is-root"
LabelQuotaTreeID = QuotaKoordinatorPrefix + "/tree-id"
LabelQuotaIgnoreDefaultTree = QuotaKoordinatorPrefix + "/ignore-default-tree"
LabelPreemptible = QuotaKoordinatorPrefix + "/preemptible"
LabelAllowForceUpdate = QuotaKoordinatorPrefix + "/allow-force-update"
AnnotationSharedWeight = QuotaKoordinatorPrefix + "/shared-weight"
AnnotationRuntime = QuotaKoordinatorPrefix + "/runtime"
AnnotationRequest = QuotaKoordinatorPrefix + "/request"
AnnotationChildRequest = QuotaKoordinatorPrefix + "/child-request"
AnnotationResourceKeys = QuotaKoordinatorPrefix + "/resource-keys"
AnnotationTotalResource = QuotaKoordinatorPrefix + "/total-resource"
AnnotationQuotaNamespaces = QuotaKoordinatorPrefix + "/namespaces"
AnnotationGuaranteed = QuotaKoordinatorPrefix + "/guaranteed"
AnnotationAllocated = QuotaKoordinatorPrefix + "/allocated"
AnnotationNonPreemptibleRequest = QuotaKoordinatorPrefix + "/non-preemptible-request"
AnnotationNonPreemptibleUsed = QuotaKoordinatorPrefix + "/non-preemptible-used"
)

func GetParentQuotaName(quota *v1alpha1.ElasticQuota) string {
Expand Down Expand Up @@ -124,6 +126,26 @@ func GetAnnotationQuotaNamespaces(quota *v1alpha1.ElasticQuota) []string {
return namespaces
}

func GetNonPreemptibleRequest(quota *v1alpha1.ElasticQuota) (corev1.ResourceList, error) {
nonPreemptibleRequest := corev1.ResourceList{}
if quota.Annotations[AnnotationNonPreemptibleRequest] != "" {
if err := json.Unmarshal([]byte(quota.Annotations[AnnotationNonPreemptibleRequest]), &nonPreemptibleRequest); err != nil {
return nonPreemptibleRequest, err
}
}
return nonPreemptibleRequest, nil
}

func GetNonPreemptibleUsed(quota *v1alpha1.ElasticQuota) (corev1.ResourceList, error) {
nonPreemptibleUsed := corev1.ResourceList{}
if quota.Annotations[AnnotationNonPreemptibleUsed] != "" {
if err := json.Unmarshal([]byte(quota.Annotations[AnnotationNonPreemptibleUsed]), &nonPreemptibleUsed); err != nil {
return nonPreemptibleUsed, err
}
}
return nonPreemptibleUsed, nil
}

func GetGuaranteed(quota *v1alpha1.ElasticQuota) (corev1.ResourceList, error) {
guaranteed := corev1.ResourceList{}
if quota.Annotations[AnnotationGuaranteed] != "" {
Expand Down
40 changes: 35 additions & 5 deletions pkg/scheduler/plugins/elasticquota/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func (ctrl *Controller) syncHandler() []error {
errors = append(errors, fmt.Errorf("failed get quota manager for %v", eq.Name))
return
}
used, request, childRequest, runtime, guaranteed, allocated, err := mgr.GetQuotaInformationForSyncHandler(eq.Name)
used, request, childRequest, runtime, guaranteed, allocated, nonPreemptibleRequest, nonPreemptibleUsed, err := mgr.GetQuotaInformationForSyncHandler(eq.Name)
if err != nil {
errors = append(errors, err)
return
Expand All @@ -121,7 +121,7 @@ func (ctrl *Controller) syncHandler() []error {
decorateResource(eq, guaranteed)
decorateResource(eq, allocated)

var oriRuntime, oriRequest, oriChildRequest, oriGuaranteed, oriAllocated v1.ResourceList
var oriRuntime, oriRequest, oriChildRequest, oriGuaranteed, oriAllocated, oriNonPreemptibleRequest, oriNonPreemptibleUsed v1.ResourceList

oriRequest, err = extension.GetRequest(eq)
if err != nil {
Expand Down Expand Up @@ -153,13 +153,27 @@ func (ctrl *Controller) syncHandler() []error {
return
}

oriNonPreemptibleRequest, err = extension.GetNonPreemptibleRequest(eq)
if err != nil {
errors = append(errors, err)
return
}

oriNonPreemptibleUsed, err = extension.GetNonPreemptibleUsed(eq)
if err != nil {
errors = append(errors, err)
return
}

// Ignore this loop if the runtime/request/used doesn't change
if quotav1.Equals(quotav1.RemoveZeros(eq.Status.Used), quotav1.RemoveZeros(used)) &&
quotav1.Equals(quotav1.RemoveZeros(oriRuntime), quotav1.RemoveZeros(runtime)) &&
quotav1.Equals(quotav1.RemoveZeros(oriRequest), quotav1.RemoveZeros(request)) &&
quotav1.Equals(quotav1.RemoveZeros(oriChildRequest), quotav1.RemoveZeros(childRequest)) &&
quotav1.Equals(quotav1.RemoveZeros(oriGuaranteed), quotav1.RemoveZeros(guaranteed)) &&
quotav1.Equals(quotav1.RemoveZeros(oriAllocated), quotav1.RemoveZeros(allocated)) {
quotav1.Equals(quotav1.RemoveZeros(oriAllocated), quotav1.RemoveZeros(allocated)) &&
quotav1.Equals(quotav1.RemoveZeros(oriNonPreemptibleRequest), quotav1.RemoveZeros(nonPreemptibleRequest)) &&
quotav1.Equals(quotav1.RemoveZeros(oriNonPreemptibleUsed), quotav1.RemoveZeros(nonPreemptibleUsed)) {
return
}
newEQ := eq.DeepCopy()
Expand Down Expand Up @@ -191,19 +205,35 @@ func (ctrl *Controller) syncHandler() []error {
errors = append(errors, err)
return
}
nonPreemptibleRequestBytes, err := json.Marshal(nonPreemptibleRequest)
if err != nil {
errors = append(errors, err)
return
}
nonPreemptibleUsedBytes, err := json.Marshal(nonPreemptibleUsed)
if err != nil {
errors = append(errors, err)
return
}
newEQ.Annotations[extension.AnnotationRuntime] = string(runtimeBytes)
newEQ.Annotations[extension.AnnotationRequest] = string(requestBytes)
newEQ.Annotations[extension.AnnotationChildRequest] = string(childRequestBytes)
newEQ.Annotations[extension.AnnotationGuaranteed] = string(guaranteedBytes)
newEQ.Annotations[extension.AnnotationAllocated] = string(allocatedBytes)
newEQ.Annotations[extension.AnnotationNonPreemptibleRequest] = string(nonPreemptibleRequestBytes)
newEQ.Annotations[extension.AnnotationNonPreemptibleUsed] = string(nonPreemptibleUsedBytes)
newEQ.Status.Used = used

klog.V(5).Infof("quota: %v, oldUsed: %v, newUsed: %v, oldRuntime: %v, newRuntime: %v, oldRequest: %v, newRequest: %v, oldChildRequest: %v, newChildRequest: %v, oldGuarantee: %v, newGuarantee: %v, oldAllocated: %v, newAllocated: %v",
klog.V(5).Infof("quota: %v, oldUsed: %v, newUsed: %v, oldRuntime: %v, newRuntime: %v, oldRequest: %v, newRequest: %v, "+
"oldChildRequest: %v, newChildRequest: %v, oldGuarantee: %v, newGuarantee: %v, oldAllocated: %v, newAllocated: %v, "+
"oldNonPreemptibleRequest: %v, newNonPreemptibleRequest: %v, oldNonPreemptibleUsed: %v, newNonPreemptibleUsed: %v",
eq.Name, eq.Status.Used, used, eq.Annotations[extension.AnnotationRuntime], string(runtimeBytes),
eq.Annotations[extension.AnnotationRequest], string(requestBytes),
eq.Annotations[extension.AnnotationChildRequest], string(childRequestBytes),
eq.Annotations[extension.AnnotationGuaranteed], string(guaranteedBytes),
eq.Annotations[extension.AnnotationAllocated], string(allocatedBytes))
eq.Annotations[extension.AnnotationAllocated], string(allocatedBytes),
eq.Annotations[extension.AnnotationNonPreemptibleRequest], string(nonPreemptibleRequestBytes),
eq.Annotations[extension.AnnotationNonPreemptibleUsed], string(nonPreemptibleUsedBytes))

patch, err := util.CreateMergePatch(eq, newEQ)
if err != nil {
Expand Down
63 changes: 33 additions & 30 deletions pkg/scheduler/plugins/elasticquota/core/group_quota_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func (gqm *GroupQuotaManager) UpdateClusterTotalResource(deltaRes v1.ResourceLis
func (gqm *GroupQuotaManager) updateClusterTotalResourceNoLock(deltaRes v1.ResourceList) {
gqm.totalResource = quotav1.Add(gqm.totalResource, deltaRes)

sysAndDefaultUsed := v1.ResourceList{}
var sysAndDefaultUsed v1.ResourceList
defaultQuota := gqm.quotaInfoMap[extension.DefaultQuotaName]
if defaultQuota != nil {
sysAndDefaultUsed = quotav1.Add(sysAndDefaultUsed, defaultQuota.CalculateInfo.Used.DeepCopy())
Expand Down Expand Up @@ -167,7 +167,7 @@ func (gqm *GroupQuotaManager) SetTotalResourceForTree(total v1.ResourceList) v1.
}

// updateGroupDeltaRequestNoLock no need lock gqm.lock
func (gqm *GroupQuotaManager) updateGroupDeltaRequestNoLock(quotaName string, deltaReq v1.ResourceList) {
func (gqm *GroupQuotaManager) updateGroupDeltaRequestNoLock(quotaName string, deltaReq, deltaNonPreemptibleRequest v1.ResourceList) {
curToAllParInfos := gqm.getCurToAllParentGroupQuotaInfoNoLock(quotaName)
allQuotaInfoLen := len(curToAllParInfos)
if allQuotaInfoLen <= 0 {
Expand All @@ -176,16 +176,16 @@ func (gqm *GroupQuotaManager) updateGroupDeltaRequestNoLock(quotaName string, de

defer gqm.scopedLockForQuotaInfo(curToAllParInfos)()

gqm.recursiveUpdateGroupTreeWithDeltaRequest(deltaReq, curToAllParInfos)
gqm.recursiveUpdateGroupTreeWithDeltaRequest(deltaReq, deltaNonPreemptibleRequest, curToAllParInfos)
}

// recursiveUpdateGroupTreeWithDeltaRequest update the quota of a node, also need update all parentNode, the lock operation
// of all quotaInfo is done by gqm. scopedLockForQuotaInfo, so just get treeWrappers' lock when calling treeWrappers' function
func (gqm *GroupQuotaManager) recursiveUpdateGroupTreeWithDeltaRequest(deltaReq v1.ResourceList, curToAllParInfos []*QuotaInfo) {
func (gqm *GroupQuotaManager) recursiveUpdateGroupTreeWithDeltaRequest(deltaReq, deltaNonPreemptibleRequest v1.ResourceList, curToAllParInfos []*QuotaInfo) {
for i := 0; i < len(curToAllParInfos); i++ {
curQuotaInfo := curToAllParInfos[i]
oldSubLimitReq := curQuotaInfo.getLimitRequestNoLock()
curQuotaInfo.addRequestNonNegativeNoLock(deltaReq)
curQuotaInfo.addRequestNonNegativeNoLock(deltaReq, deltaNonPreemptibleRequest)
if curQuotaInfo.Name == extension.RootQuotaName {
return
}
Expand Down Expand Up @@ -250,7 +250,7 @@ func (gqm *GroupQuotaManager) updateGroupDeltaUsedNoLock(quotaName string, delta

// if systemQuotaGroup or DefaultQuotaGroup's used change, update cluster total resource.
if quotaName == extension.SystemQuotaName || quotaName == extension.DefaultQuotaName {
gqm.updateClusterTotalResourceNoLock(v1.ResourceList{})
gqm.updateClusterTotalResourceNoLock(nil)
}
}

Expand Down Expand Up @@ -472,7 +472,8 @@ func (gqm *GroupQuotaManager) buildSubParGroupTopoNoLock() {

// ResetAllGroupQuotaNoLock no need to lock gqm.lock
func (gqm *GroupQuotaManager) resetAllGroupQuotaNoLock() {
childRequestMap, childNonPreemptibleUsedMap, childUsedMap := make(quotaResMapType), make(quotaResMapType), make(quotaResMapType)
childRequestMap, childNonPreemptibleUsedMap, childUsedMap, childNonPreemptibleRequestMap :=
make(quotaResMapType), make(quotaResMapType), make(quotaResMapType), make(quotaResMapType)
for quotaName, topoNode := range gqm.quotaTopoNodeMap {
if quotaName == extension.RootQuotaName {
gqm.resetRootQuotaUsedAndRequest()
Expand All @@ -481,6 +482,7 @@ func (gqm *GroupQuotaManager) resetAllGroupQuotaNoLock() {
topoNode.quotaInfo.lock.Lock()
if !topoNode.quotaInfo.IsParent {
childRequestMap[quotaName] = topoNode.quotaInfo.CalculateInfo.ChildRequest.DeepCopy()
childNonPreemptibleRequestMap[quotaName] = topoNode.quotaInfo.CalculateInfo.NonPreemptibleRequest.DeepCopy()
childNonPreemptibleUsedMap[quotaName] = topoNode.quotaInfo.CalculateInfo.NonPreemptibleUsed.DeepCopy()
childUsedMap[quotaName] = topoNode.quotaInfo.CalculateInfo.Used.DeepCopy()
}
Expand All @@ -500,7 +502,7 @@ func (gqm *GroupQuotaManager) resetAllGroupQuotaNoLock() {
// subGroup's topo relation may change; refresh the request/used from bottom to top
for quotaName, topoNode := range gqm.quotaTopoNodeMap {
if !topoNode.quotaInfo.IsParent {
gqm.updateGroupDeltaRequestNoLock(quotaName, childRequestMap[quotaName])
gqm.updateGroupDeltaRequestNoLock(quotaName, childRequestMap[quotaName], childNonPreemptibleRequestMap[quotaName])
gqm.updateGroupDeltaUsedNoLock(quotaName, childUsedMap[quotaName], childNonPreemptibleUsedMap[quotaName])
}
}
Expand Down Expand Up @@ -585,24 +587,27 @@ func (gqm *GroupQuotaManager) GetAllQuotaNames() map[string]struct{} {
}

func (gqm *GroupQuotaManager) updatePodRequestNoLock(quotaName string, oldPod, newPod *v1.Pod) {
var oldPodReq, newPodReq v1.ResourceList
var oldPodReq, newPodReq, oldNonPreemptibleRequest, newNonPreemptibleRequest v1.ResourceList
if oldPod != nil {
oldPodReq, _ = PodRequestsAndLimits(oldPod)
} else {
oldPodReq = make(v1.ResourceList)
if extension.IsPodNonPreemptible(oldPod) {
oldNonPreemptibleRequest = oldPodReq
}
}

if newPod != nil {
newPodReq, _ = PodRequestsAndLimits(newPod)
} else {
newPodReq = make(v1.ResourceList)
if extension.IsPodNonPreemptible(newPod) {
newNonPreemptibleRequest = newPodReq
}
}

deltaReq := quotav1.Subtract(newPodReq, oldPodReq)
if quotav1.IsZero(deltaReq) {
deltaNonPreemptibleRequest := quotav1.Subtract(newNonPreemptibleRequest, oldNonPreemptibleRequest)
if quotav1.IsZero(deltaReq) && quotav1.IsZero(deltaNonPreemptibleRequest) {
return
}
gqm.updateGroupDeltaRequestNoLock(quotaName, deltaReq)
gqm.updateGroupDeltaRequestNoLock(quotaName, deltaReq, deltaNonPreemptibleRequest)
}

func (gqm *GroupQuotaManager) updatePodUsedNoLock(quotaName string, oldPod, newPod *v1.Pod) {
Expand All @@ -622,19 +627,13 @@ func (gqm *GroupQuotaManager) updatePodUsedNoLock(quotaName string, oldPod, newP
if extension.IsPodNonPreemptible(oldPod) {
oldNonPreemptibleUsed = oldPodUsed
}
} else {
oldPodUsed = make(v1.ResourceList)
oldNonPreemptibleUsed = make(v1.ResourceList)
}

if newPod != nil {
newPodUsed, _ = PodRequestsAndLimits(newPod)
if extension.IsPodNonPreemptible(newPod) {
newNonPreemptibleUsed = newPodUsed
}
} else {
newPodUsed = make(v1.ResourceList)
newNonPreemptibleUsed = make(v1.ResourceList)
}

deltaUsed := quotav1.Subtract(newPodUsed, oldPodUsed)
Expand Down Expand Up @@ -806,17 +805,20 @@ func (gqm *GroupQuotaManager) UnreservePod(quotaName string, p *v1.Pod) {
gqm.updatePodIsAssignedNoLock(quotaName, p, false)
}

func (gqm *GroupQuotaManager) GetQuotaInformationForSyncHandler(quotaName string) (used, request, childRequest, runtime, guaranteed, allocated v1.ResourceList, err error) {
func (gqm *GroupQuotaManager) GetQuotaInformationForSyncHandler(quotaName string) (used, request, childRequest, runtime,
guaranteed, allocated, nonPreemptibleRequest, nonPreemptibleUsed v1.ResourceList, err error) {
gqm.hierarchyUpdateLock.RLock()
defer gqm.hierarchyUpdateLock.RUnlock()

quotaInfo := gqm.getQuotaInfoByNameNoLock(quotaName)
if quotaInfo == nil {
return nil, nil, nil, nil, nil, nil, fmt.Errorf("groupQuotaManager doesn't have this quota:%v", quotaName)
return nil, nil, nil, nil,
nil, nil, nil, nil, fmt.Errorf("groupQuotaManager doesn't have this quota:%v", quotaName)
}

runtime = gqm.RefreshRuntimeNoLock(quotaName)
return quotaInfo.GetUsed(), quotaInfo.GetRequest(), quotaInfo.GetChildRequest(), runtime, quotaInfo.GetGuaranteed(), quotaInfo.GetAllocated(), nil
return quotaInfo.GetUsed(), quotaInfo.GetRequest(), quotaInfo.GetChildRequest(), runtime,
quotaInfo.GetGuaranteed(), quotaInfo.GetAllocated(), quotaInfo.GetNonPreemptibleRequest(), quotaInfo.GetNonPreemptibleUsed(), nil
}

func getPodName(oldPod, newPod *v1.Pod) string {
Expand Down Expand Up @@ -871,7 +873,7 @@ func (gqm *GroupQuotaManager) OnNodeDelete(node *v1.Node) {
return
}

delta := quotav1.Subtract(v1.ResourceList{}, node.Status.Allocatable)
delta := quotav1.Subtract(nil, node.Status.Allocatable)
gqm.UpdateClusterTotalResource(delta)
delete(gqm.nodeResourceMap, node.Name)
klog.V(5).Infof("OnNodeDeleteFunc success: %v [%v]", node.Name, delta)
Expand All @@ -886,27 +888,28 @@ func (gqm *GroupQuotaManager) resetRootQuotaUsedAndRequest() {
rootQuotaInfo.lock.Lock()
defer rootQuotaInfo.lock.Unlock()

used := v1.ResourceList{}
request := v1.ResourceList{}
nonPreemptUsed := v1.ResourceList{}
var used, request, nonPreemptUsed, nonPreemptRequest v1.ResourceList

systemQuotaInfo := gqm.getQuotaInfoByNameNoLock(extension.SystemQuotaName)
if systemQuotaInfo != nil {
used = quotav1.Add(used, systemQuotaInfo.GetUsed())
request = quotav1.Add(request, systemQuotaInfo.GetRequest())
nonPreemptUsed = quotav1.Add(nonPreemptUsed, systemQuotaInfo.GetNonPreemptibleUsed())
nonPreemptRequest = quotav1.Add(nonPreemptRequest, systemQuotaInfo.GetNonPreemptibleRequest())
}

defaultQuotaInfo := gqm.getQuotaInfoByNameNoLock(extension.DefaultQuotaName)
if defaultQuotaInfo != nil {
used = quotav1.Add(used, defaultQuotaInfo.GetUsed())
request = quotav1.Add(request, defaultQuotaInfo.GetRequest())
nonPreemptUsed = quotav1.Add(nonPreemptUsed, defaultQuotaInfo.GetNonPreemptibleUsed())
nonPreemptRequest = quotav1.Add(nonPreemptRequest, defaultQuotaInfo.GetNonPreemptibleRequest())
}

rootQuotaInfo.CalculateInfo.Used = used
rootQuotaInfo.CalculateInfo.Request = request
rootQuotaInfo.CalculateInfo.NonPreemptibleUsed = nonPreemptUsed
rootQuotaInfo.CalculateInfo.NonPreemptibleRequest = nonPreemptRequest
}

func (gqm *GroupQuotaManager) recursiveUpdateGroupTreeWithDeltaAllocated(deltaAllocated v1.ResourceList, curToAllParInfos []*QuotaInfo) {
Expand Down Expand Up @@ -986,7 +989,7 @@ func (gqm *GroupQuotaManager) doUpdateOneGroupMaxQuotaNoLock(quotaName string, n

newSubLimitReq := curQuotaInfo.getLimitRequestNoLock()
deltaRequest := quotav1.Subtract(newSubLimitReq, oldSubLimitReq)
gqm.recursiveUpdateGroupTreeWithDeltaRequest(deltaRequest, curToAllParInfos[1:])
gqm.recursiveUpdateGroupTreeWithDeltaRequest(deltaRequest, nil, curToAllParInfos[1:])
}
}

Expand Down Expand Up @@ -1024,7 +1027,7 @@ func (gqm *GroupQuotaManager) doUpdateOneGroupMinQuotaNoLock(quotaName string, n

newSubLimitReq := curQuotaInfo.getLimitRequestNoLock()
deltaRequest := quotav1.Subtract(newSubLimitReq, oldSubLimitReq)
gqm.recursiveUpdateGroupTreeWithDeltaRequest(deltaRequest, curToAllParInfos[1:])
gqm.recursiveUpdateGroupTreeWithDeltaRequest(deltaRequest, nil, curToAllParInfos[1:])
}

// update the guarantee.
Expand Down
Loading

0 comments on commit 661dd71

Please sign in to comment.