From a19aeaed243ec23822701a284b99ed90354b34b1 Mon Sep 17 00:00:00 2001 From: Richard Chapman Date: Wed, 1 May 2024 12:53:37 +0100 Subject: [PATCH] HPCC-31511 Avoid keeping the workunit graphs in memory Changes following review Signed-off-by: Richard Chapman --- esp/platform/CMakeLists.txt | 1 + thorlcr/master/thgraphmanager.cpp | 2 +- thorlcr/slave/thslavemain.cpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/esp/platform/CMakeLists.txt b/esp/platform/CMakeLists.txt index d1da75f16c5..f817c5ba279 100644 --- a/esp/platform/CMakeLists.txt +++ b/esp/platform/CMakeLists.txt @@ -62,6 +62,7 @@ target_link_libraries ( esp hrpc remote dalibase + workunit ) if (NOT CONTAINERIZED) diff --git a/thorlcr/master/thgraphmanager.cpp b/thorlcr/master/thgraphmanager.cpp index a8384c6d237..0a113dff32a 100644 --- a/thorlcr/master/thgraphmanager.cpp +++ b/thorlcr/master/thgraphmanager.cpp @@ -559,7 +559,7 @@ bool CJobManager::execute(IConstWorkUnit *workunit, const char *wuid, const char wu->setDebugAgentListenerIP(sb); //tells debugger what IP to write commands to wu->setDebugAgentListenerPort(debugListener->getPort()); } - + workunitGraphCacheEnabled = getExpertOptBool("workunitGraphCacheEnabled", workunitGraphCacheEnabled); return doit(workunit, graphName, agentep); } catch (IException *e) diff --git a/thorlcr/slave/thslavemain.cpp b/thorlcr/slave/thslavemain.cpp index ed2e936be74..2f0c496a8cf 100644 --- a/thorlcr/slave/thslavemain.cpp +++ b/thorlcr/slave/thslavemain.cpp @@ -184,6 +184,7 @@ static bool RegisterSelf(SocketEndpoint &masterEp) getExpertOptPath(nullptr, xpath); // 'expert' in container world, or 'Debug' in bare-metal ensurePTree(globals, xpath); unsigned numStrands, blockSize; + workunitGraphCacheEnabled = getExpertOptBool("workunitGraphCacheEnabled", workunitGraphCacheEnabled); getExpertOptPath("forceNumStrands", xpath.clear()); if (globals->hasProp(xpath)) numStrands = globals->getPropInt(xpath); @@ -393,7 +394,6 @@ int main( int argc, const char *argv[] ) #else globals.setown(loadConfiguration(globals, argv, "thor", "THOR", nullptr, nullptr, nullptr, false)); #endif - workunitGraphCacheEnabled = globals->getPropBool("expert/@workunitGraphCacheEnabled", workunitGraphCacheEnabled); // NB: the thor configuration is serialized from the manager and only available after RegisterSelf // Until that point, only properties on the command line are available.