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

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


The following commit(s) were added to refs/heads/branch-1.5 by this push:
     new a8ac1d63 [YUNIKORN-2574] totalPartitionResource should not be mutated 
with AddTo/SubFrom (#853)
a8ac1d63 is described below

commit a8ac1d6383238a75c5272daef2304201cb33de31
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 61a42b45..24c66c32 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