You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@yunikorn.apache.org by cc...@apache.org on 2024/04/23 19:57:29 UTC

(yunikorn-core) branch master updated: [YUNIKORN-2574] totalPartitionResource should not be mutated with AddTo/SubFrom (#853)

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

ccondit 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 72286b84 [YUNIKORN-2574] totalPartitionResource should not be mutated with AddTo/SubFrom (#853)
72286b84 is described below

commit 72286b84923b272fcd95157b76d20516d03946f2
Author: Peter Bacsko <pb...@cloudera.com>
AuthorDate: Tue Apr 23 14:57:14 2024 -0500

    [YUNIKORN-2574] totalPartitionResource should not be mutated with AddTo/SubFrom (#853)
    
    Closes: #853
    
    Signed-off-by: Craig Condit <cc...@apache.org>
---
 pkg/scheduler/partition.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pkg/scheduler/partition.go b/pkg/scheduler/partition.go
index 992efade..a72dc75c 100644
--- a/pkg/scheduler/partition.go
+++ b/pkg/scheduler/partition.go
@@ -1013,7 +1013,7 @@ func (pc *PartitionContext) GetTotalPartitionResource() *resources.Resource {
 	pc.RLock()
 	defer pc.RUnlock()
 
-	return pc.totalPartitionResource
+	return pc.totalPartitionResource.Clone()
 }
 
 func (pc *PartitionContext) GetAllocatedResource() *resources.Resource {


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