Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/candidate-9.10.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
GordonSmith committed Feb 21, 2025
2 parents 6b2b676 + e847a86 commit 6c69419
Show file tree
Hide file tree
Showing 78 changed files with 1,665 additions and 948 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-gh_runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ jobs:
for plugin in "${plugins[@]}"; do
rm -f ./build/CMakeCache.txt
rm -rf ./build/CMakeFiles
cmake ${{ !contains(inputs.os, 'windows') && '-G Ninja' || '' }} -S ./${{ inputs.ln == true && 'LN' || 'HPCC-Platform' }} -B ./build -DCMAKE_BUILD_TYPE=${{ inputs.build-type }} -DCONTAINERIZED=${{ inputs.containerized == true && 'ON' || 'OFF' }} -DCPACK_STRIP_FILES=${{ inputs.strip-files == true && 'ON' || 'OFF' }} ${{ inputs.single-package == true && '-DINCLUDE_PLUGINS=ON' || '-D$plugin=ON' }} ${{ inputs.cmake-configuration }} ${{ inputs.cmake-configuration-ex }}
cmake ${{ !contains(inputs.os, 'windows') && '-G Ninja' || '' }} -S ./${{ inputs.ln == true && 'LN' || 'HPCC-Platform' }} -B ./build -DCMAKE_BUILD_TYPE=${{ inputs.build-type }} -DTESTING=ON -DCONTAINERIZED=${{ inputs.containerized == true && 'ON' || 'OFF' }} -DCPACK_STRIP_FILES=${{ inputs.strip-files == true && 'ON' || 'OFF' }} ${{ inputs.single-package == true && '-DINCLUDE_PLUGINS=ON' || '-D$plugin=ON' }} ${{ inputs.cmake-configuration }} ${{ inputs.cmake-configuration-ex }}
cmake --build ./build ${{ contains(inputs.os, 'windows') && '--config RelWithDebInfo' || ''}} --parallel ${{ inputs.upload-package == true && '--target package' || ''}}
done
Expand Down
4 changes: 4 additions & 0 deletions cmake_modules/commonSetup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,10 @@ IF ("${COMMONSETUP_DONE}" STREQUAL "")
add_definitions (-D_CONTAINERIZED)
ENDIF(CONTAINERIZED)

IF (TESTING)
add_definitions (-D_TESTING)
ENDIF(TESTING)

IF (USE_ICU)
find_package(ICU COMPONENTS data i18n io tu uc)
IF (ICU_FOUND)
Expand Down
12 changes: 12 additions & 0 deletions common/workunit/workunit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5248,6 +5248,18 @@ IWorkUnit* CWorkUnitFactory::createNamedWorkUnit(const char *wuid, const char *a
IWorkUnit* ret = &cw->lockRemote(false); // Note - this may throw exception if user does not have rights.
ret->setDebugValue("CREATED_BY", app, true);
ret->setDebugValue("CREATED_FOR", scope, true);
if (secuser)
{
//Record employee ids and numbers in the workunit if they are available.
//Future: This should probably be stored in an un-modifiable attribute and set by setUser()
const char * id = secuser->getEmployeeID();
if (!isEmptyString(id))
ret->setDebugValue("CREATOR_EMPLOYEE_ID", id, true);

const char * number = secuser->getEmployeeNumber();
if (!isEmptyString(number))
ret->setDebugValue("CREATOR_EMPLOYEE_NUMBER", number, true);
}
return ret;
}

Expand Down
5 changes: 5 additions & 0 deletions dali/base/daclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "dautils.hpp"

#include "daclient.hpp"
#include "sysinfologger.hpp"

extern bool registerClientProcess(ICommunicator *comm, IGroup *& retcoven,unsigned timeout,DaliClientRole role);
extern void stopClientProcess();
Expand Down Expand Up @@ -141,6 +142,9 @@ bool initClientProcess(IGroup *servergrp, DaliClientRole role, unsigned mpport,
covengrp->Release();
queryLogMsgManager()->setSession(myProcessSession());

if (getComponentConfigSP()->getPropBool("logging/@enableGlobalSysLog"))
useDaliForOperatorMessages(true);

if (!isContainerized()) // The Environment is bare-metal only
{
// auto install environment monitor for server roles
Expand Down Expand Up @@ -179,6 +183,7 @@ void removeShutdownHook(IDaliClientShutdown &shutdown)

void closedownClientProcess()
{
useDaliForOperatorMessages(false);
if (!daliClientIsActive)
return;
while (shutdownHooks.ordinality())
Expand Down
53 changes: 40 additions & 13 deletions dali/base/dafdesc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3845,40 +3845,67 @@ void disableStoragePlanesDaliUpdates()

bool getDefaultStoragePlane(StringBuffer &ret)
{
#ifdef _CONTAINERIZED
if (!isContainerized())
return false;
if (getDefaultPlane(ret, "@dataPlane", "data"))
return true;

throwUnexpectedX("Default data plane not specified"); // The default should always have been configured by the helm charts
#else
return false;
#endif
}

bool getDefaultSpillPlane(StringBuffer &ret)
{
#ifdef _CONTAINERIZED
if (getDefaultPlane(ret, "@spillPlane", "spill"))
if (!isContainerized())
return false;
if (getComponentConfigSP()->getProp("@spillPlane", ret))
return true;
else if (getGlobalConfigSP()->getProp("storage/@spillPlane", ret))
return true;
else if (getDefaultPlane(ret, nullptr, "spill"))
return true;

throwUnexpectedX("Default spill plane not specified"); // The default should always have been configured by the helm charts
#else
return false;
#endif
}

bool getDefaultIndexBuildStoragePlane(StringBuffer &ret)
{
#ifdef _CONTAINERIZED
if (!isContainerized())
return false;
if (getComponentConfigSP()->getProp("@indexBuildPlane", ret))
return true;
else if (getGlobalConfigSP()->getProp("storage/@indexBuildPlane", ret))
return true;
else
return getDefaultStoragePlane(ret);
#else
return false;
#endif
}

bool getDefaultPersistPlane(StringBuffer &ret)
{
if (!isContainerized())
return false;
if (getComponentConfigSP()->getProp("@persistPlane", ret))
return true;
else if (getGlobalConfigSP()->getProp("storage/@persistPlane", ret))
return true;
else
return getDefaultStoragePlane(ret);
}

bool getDefaultJobTempPlane(StringBuffer &ret)
{
if (!isContainerized())
return false;
if (getComponentConfigSP()->getProp("@jobTempPlane", ret))
return true;
else if (getGlobalConfigSP()->getProp("storage/@jobTempPlane", ret))
return true;
else
{
// NB: In hthor jobtemps are written to the spill plane and hence ephemeral storage by default
// In Thor they are written to the default data storage plane by default.
// This is because HThor doesn't need them persisted beyond the lifetime of the process, but Thor does.
return getDefaultStoragePlane(ret);
}
}

//---------------------------------------------------------------------------------------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions dali/base/dafdesc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,8 @@ extern da_decl void disableStoragePlanesDaliUpdates();
extern da_decl bool getDefaultStoragePlane(StringBuffer &ret);
extern da_decl bool getDefaultSpillPlane(StringBuffer &ret);
extern da_decl bool getDefaultIndexBuildStoragePlane(StringBuffer &ret);
extern da_decl bool getDefaultPersistPlane(StringBuffer &ret);
extern da_decl bool getDefaultJobTempPlane(StringBuffer &ret);
extern da_decl IStoragePlane * getDataStoragePlane(const char * name, bool required);
extern da_decl IStoragePlane * getRemoteStoragePlane(const char * name, bool required);
extern da_decl IStoragePlane * createStoragePlane(IPropertyTree *meta);
Expand Down
Loading

0 comments on commit 6c69419

Please sign in to comment.