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 <[email protected]>
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 <[email protected]>
---
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: [email protected]
For additional commands, e-mail: [email protected]