From ffb592eefa6be37fc216c76d603d3632264cd0d6 Mon Sep 17 00:00:00 2001 From: Shamser Ahmed Date: Fri, 1 Mar 2024 12:21:26 +0000 Subject: [PATCH] HPCC-31382 Activity CostFileAccess not always updated to sg scope Subgraph's CostFileAccess was being set before the activities stats are updated, meaning that some activities CostFileAccess is not updated to subgraph scope. Signed-off-by: Shamser Ahmed --- thorlcr/graph/thgraphmaster.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/thorlcr/graph/thgraphmaster.cpp b/thorlcr/graph/thgraphmaster.cpp index a766c523282..158c7ee226f 100644 --- a/thorlcr/graph/thgraphmaster.cpp +++ b/thorlcr/graph/thgraphmaster.cpp @@ -2925,10 +2925,6 @@ bool CMasterGraph::deserializeStats(unsigned node, MemoryBuffer &mb) void CMasterGraph::getStats(IStatisticGatherer &stats) { stats.addStatistic(StNumSlaves, queryClusterWidth()); - cost_type costDiskAccess = getDiskAccessCost(); - if (costDiskAccess) - stats.addStatistic(StCostFileAccess, costDiskAccess); - // graph specific stats graphStats.getStats(stats); @@ -2957,6 +2953,9 @@ void CMasterGraph::getStats(IStatisticGatherer &stats) activity->getActivityStats(stats); } } + cost_type costDiskAccess = getDiskAccessCost(); + if (costDiskAccess) + stats.addStatistic(StCostFileAccess, costDiskAccess); } cost_type CMasterGraph::getDiskAccessCost()