瀏覽代碼

Merge pull request #15795 from shamser/issue27205

HPCC-27205 Fix cost guillotine config issue

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>
Merged-by: Gavin Halliday <ghalliday@hpccsystems.com>
Gavin Halliday 3 年之前
父節點
當前提交
2332a5f9fd
共有 2 個文件被更改,包括 4 次插入4 次删除
  1. 1 1
      system/jlib/jptree.cpp
  2. 3 3
      thorlcr/master/thdemonserver.cpp

+ 1 - 1
system/jlib/jptree.cpp

@@ -9598,7 +9598,7 @@ void saveYAML(IIOStream &stream, const IPropertyTree *tree, unsigned indent, uns
 
 jlib_decl IPropertyTree * getCostsConfiguration()
 {
-    return getComponentConfigSP()->getPropTree("costs");
+    return getComponentConfigSP()->getPropTree("cost");
 }
 
 void copyPropIfMissing(IPropertyTree & target, const char * targetName, IPropertyTree & source, const char * sourceName)

+ 3 - 3
thorlcr/master/thdemonserver.cpp

@@ -92,17 +92,17 @@ private:
         {
             const unsigned clusterWidth = queryNodeClusterWidth();
             const cost_type sgCost = money2cost_type(calcCost(thorManagerRate, duration) + calcCost(thorWorkerRate, duration) * clusterWidth);
+            cost_type costDiskAccess = graph.getDiskAccessCost();
             if (finished)
             {
                 if (sgCost)
                     wu->setStatistic(queryStatisticsComponentType(), queryStatisticsComponentName(), SSTsubgraph, graphScope, StCostExecute, NULL, sgCost, 1, 0, StatsMergeReplace);
-                cost_type costDiskAccess = graph.getDiskAccessCost();
                 if (costDiskAccess)
                     wu->setStatistic(queryStatisticsComponentType(), queryStatisticsComponentName(), SSTsubgraph, graphScope, StCostFileAccess, NULL, costDiskAccess, 1, 0, StatsMergeReplace);
             }
 
-            const cost_type totalCost = workunitCost + sgCost;
-            if (costLimit>0.0 && totalCost > costLimit)
+            const cost_type totalCost = workunitCost + sgCost + costDiskAccess;
+            if (costLimit>0 && totalCost > costLimit)
             {
                 LOG(MCwarning, thorJob, "ABORT job cost exceeds limit");
                 graph.fireException(MakeThorException(TE_CostExceeded, "Job cost exceeds limit"));