From b39806188e3a2f17cb1ef33efb2c5da3f56874d5 Mon Sep 17 00:00:00 2001 From: Jake Smith Date: Wed, 11 Oct 2023 17:44:22 +0100 Subject: [PATCH] HPCC-30468 review changes Signed-off-by: Jake Smith --- dali/base/dautils.cpp | 8 +++++++- esp/clients/ws_dfsclient/ws_dfsclient.cpp | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/dali/base/dautils.cpp b/dali/base/dautils.cpp index db22a9cd49c..8affed148fd 100644 --- a/dali/base/dautils.cpp +++ b/dali/base/dautils.cpp @@ -3647,9 +3647,15 @@ void remapGroupsToDafilesrv(IPropertyTree *file, INamedGroupStore *resolver) group.setown(resolver->lookup(planeName, defaultDir, groupType)); } + Linked dafileSrvNodeCopy; + { + // in case config hook above changes dafileSrvNode + CriticalBlock b(dafileSrvNodeCS); + dafileSrvNodeCopy.set(dafileSrvNode); + } std::vector nodes; for (unsigned n=0; nordinality(); n++) - nodes.push_back(dafileSrvNode); + nodes.push_back(dafileSrvNodeCopy); Owned newGroup = createIGroup((rank_t)group->ordinality(), &nodes[0]); StringBuffer groupText; newGroup->getText(groupText); diff --git a/esp/clients/ws_dfsclient/ws_dfsclient.cpp b/esp/clients/ws_dfsclient/ws_dfsclient.cpp index bdb5b82741d..677e14f3535 100644 --- a/esp/clients/ws_dfsclient/ws_dfsclient.cpp +++ b/esp/clients/ws_dfsclient/ws_dfsclient.cpp @@ -688,7 +688,7 @@ IDFSFile *lookupDFSFile(const char *logicalName, AccessMode accessMode, unsigned // auto-discover local environment dfs service. #ifdef _CONTAINERIZED // NB: only expected to be here if experimental option #option('dfsesp-localfiles', true); is in use. - // This finds and uses local dfs service for local read lookkups. + // This finds and uses local dfs service for local read lookups. Owned eclWatchServices = getGlobalConfigSP()->getElements("services[@type='dfs']"); if (!eclWatchServices->first()) throw makeStringException(-1, "Dfs service not defined in esp services");