You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@yunikorn.apache.org by ma...@apache.org on 2024/02/08 06:44:37 UTC

(yunikorn-core) branch master updated: [YUNIKORN-2284] ERROR message when stopping Service context (#778)

This is an automated email from the ASF dual-hosted git repository.

mani pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/yunikorn-core.git


The following commit(s) were added to refs/heads/master by this push:
     new bb59d9ce [YUNIKORN-2284] ERROR message when stopping Service context (#778)
bb59d9ce is described below

commit bb59d9ce683cde52429fdbd2de3ad2c8206bd5ca
Author: PoAn Yang <pa...@apache.org>
AuthorDate: Thu Feb 8 12:14:14 2024 +0530

    [YUNIKORN-2284] ERROR message when stopping Service context (#778)
    
    Closes: #778
    
    Signed-off-by: Manikandan R <ma...@gmail.com>
---
 pkg/scheduler/objects/application.go | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/pkg/scheduler/objects/application.go b/pkg/scheduler/objects/application.go
index d26634da..b8d8f60a 100644
--- a/pkg/scheduler/objects/application.go
+++ b/pkg/scheduler/objects/application.go
@@ -1849,7 +1849,9 @@ func (sa *Application) RemoveAllAllocations() []*Allocation {
 		sa.appEvents.sendRemoveAllocationEvent(alloc, si.TerminationType_STOPPED_BY_RM)
 	}
 
-	if resources.IsZero(sa.pending) {
+	// if an app doesn't have any allocations and the user doesn't have other applications,
+	// the user tracker is nonexistent. We don't want to decrease resource usage in this case.
+	if ugm.GetUserManager().GetUserTracker(sa.user.User) != nil && resources.IsZero(sa.pending) {
 		sa.decUserResourceUsage(resources.Add(sa.allocatedResource, sa.allocatedPlaceholder), true)
 	}
 	// cleanup allocated resource for app (placeholders and normal)


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@yunikorn.apache.org
For additional commands, e-mail: issues-help@yunikorn.apache.org