Skip to content

Commit

Permalink
Merge pull request #19291 from asselitx/unused-files-hpcc-32963
Browse files Browse the repository at this point in the history
HPCC-32963 Fix ecl unused-files for bare-metal roxie with TLS and custom port

Reviewed-by: Mark Kelly [email protected]
Merged-by: Gavin Halliday <[email protected]>
  • Loading branch information
ghalliday authored Nov 28, 2024
2 parents ab280fe + 5dc7b23 commit 128b9d0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
17 changes: 13 additions & 4 deletions esp/services/ws_dfu/ws_dfuXRefService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ void CWsDfuXRefEx::init(IPropertyTree *cfg, const char *process, const char *ser
throw MakeStringException(-1, "No Dali Connection Active. Please Specify a Dali to connect to in you configuration file");
}

#ifndef _CONTAINERIZED
initBareMetalRoxieTargets(roxieConnMap);
#endif

XRefNodeManager.setown(CreateXRefNodeFactory());

//Start out builder thread......
Expand Down Expand Up @@ -750,19 +754,24 @@ void CWsDfuXRefEx::findUnusedFilesWithDetailsInDFS(IEspContext &context, const c
void CWsDfuXRefEx::getRoxieFiles(const char *process, bool checkPackageMaps, MapStringTo<bool> &usedFileMap)
{
SocketEndpointArray servers;
Owned<IPropertyTree> controlXrefInfo;
#ifdef _CONTAINERIZED
StringBuffer epStr;
getService(epStr, process, true);
SocketEndpoint ep(epStr);
servers.append(ep);
#else
getRoxieProcessServers(process, servers);
if (!servers.length())
throw MakeStringExceptionDirect(ECLWATCH_INVALID_CLUSTER_INFO, "process cluster, not found.");
Owned<ISocket> sock = ISocket::connect_timeout(servers.item(0), ROXIECONNECTIONTIMEOUT);
controlXrefInfo.setown(sendRoxieControlQuery(sock, "<control:getQueryXrefInfo/>", ROXIECONTROLXREFTIMEOUT));
#else
ISmartSocketFactory *conn = roxieConnMap.getValue(process);
if (!conn)
throw makeStringExceptionV(ECLWATCH_CANNOT_GET_ENV_INFO, "Connection info for '%s' process cluster not found.", process ? process : "(null)");

controlXrefInfo.setown(sendRoxieControlQuery(conn, "<control:getQueryXrefInfo/>", ROXIECONTROLXREFTIMEOUT, ROXIECONNECTIONTIMEOUT));
#endif

Owned<ISocket> sock = ISocket::connect_timeout(servers.item(0), ROXIECONNECTIONTIMEOUT);
Owned<IPropertyTree> controlXrefInfo = sendRoxieControlQuery(sock, "<control:getQueryXrefInfo/>", ROXIECONTROLXREFTIMEOUT);
if (!controlXrefInfo)
throw MakeStringExceptionDirect(ECLWATCH_INTERNAL_ERROR, "roxie cluster, not responding.");
Owned<IPropertyTreeIterator> roxieFiles = controlXrefInfo->getElements("//File");
Expand Down
1 change: 1 addition & 0 deletions esp/services/ws_dfu/ws_dfuXRefService.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ class CWsDfuXRefEx : public CWsDFUXRef
{
Owned<IXRefNodeManager> XRefNodeManager;
Owned<CXRefExBuilderThread> m_XRefbuilder;
MapStringToMyClass<ISmartSocketFactory> roxieConnMap;

IXRefFilesNode* getFileNodeInterface(IXRefNode& XRefNode,const char* nodeType);
void addXRefNode(const char* name, IPropertyTree* pXRefNodeTree);
Expand Down

0 comments on commit 128b9d0

Please sign in to comment.