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

Reply via email to