From 4993fb1b220aee7d46653ea4da2faed117a8a934 Mon Sep 17 00:00:00 2001 From: M Kelly Date: Mon, 11 Nov 2024 08:43:24 -0500 Subject: [PATCH] HPCC-32964 Add a Roxie Background priority queue Signed-off-by: M Kelly --- roxie/ccd/ccd.hpp | 4 ++-- roxie/ccd/ccdmain.cpp | 6 ++++-- roxie/ccd/ccdstate.cpp | 10 ++++++++++ 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/roxie/ccd/ccd.hpp b/roxie/ccd/ccd.hpp index f84e493a2c0..261754e3761 100644 --- a/roxie/ccd/ccd.hpp +++ b/roxie/ccd/ccd.hpp @@ -334,8 +334,8 @@ extern unsigned memoryStatsInterval; extern unsigned pingInterval; extern unsigned socketCheckInterval; extern memsize_t defaultMemoryLimit; -extern unsigned defaultTimeLimit[3]; -extern unsigned defaultWarnTimeLimit[3]; +extern unsigned defaultTimeLimit[4]; +extern unsigned defaultWarnTimeLimit[4]; extern unsigned defaultThorConnectTimeout; extern bool pretendAllOpt; extern ClientCertificate clientCert; diff --git a/roxie/ccd/ccdmain.cpp b/roxie/ccd/ccdmain.cpp index 192e58a5670..3d4262b6922 100644 --- a/roxie/ccd/ccdmain.cpp +++ b/roxie/ccd/ccdmain.cpp @@ -164,8 +164,8 @@ int backgroundCopyPrio = 0; unsigned memoryStatsInterval = 0; memsize_t defaultMemoryLimit; -unsigned defaultTimeLimit[3] = {0, 0, 0}; -unsigned defaultWarnTimeLimit[3] = {0, 5000, 5000}; +unsigned defaultTimeLimit[4] = {0, 0, 0, 0}; +unsigned defaultWarnTimeLimit[4] = {0, 5000, 5000, 10000}; unsigned defaultThorConnectTimeout; unsigned defaultParallelJoinPreload = 0; @@ -1169,9 +1169,11 @@ int CCD_API roxie_main(int argc, const char *argv[], const char * defaultYaml) defaultTimeLimit[0] = (unsigned) topology->getPropInt64("@defaultLowPriorityTimeLimit", 0); defaultTimeLimit[1] = (unsigned) topology->getPropInt64("@defaultHighPriorityTimeLimit", 0); defaultTimeLimit[2] = (unsigned) topology->getPropInt64("@defaultSLAPriorityTimeLimit", 0); + defaultTimeLimit[3] = (unsigned) topology->getPropInt64("@defaultBGPriorityTimeLimit", 0); defaultWarnTimeLimit[0] = (unsigned) topology->getPropInt64("@defaultLowPriorityTimeWarning", 0); defaultWarnTimeLimit[1] = (unsigned) topology->getPropInt64("@defaultHighPriorityTimeWarning", 0); defaultWarnTimeLimit[2] = (unsigned) topology->getPropInt64("@defaultSLAPriorityTimeWarning", 0); + defaultWarnTimeLimit[3] = (unsigned) topology->getPropInt64("@defaultBGPriorityTimeWarning", 0); defaultThorConnectTimeout = (unsigned) topology->getPropInt64("@defaultThorConnectTimeout", 60); continuationCompressThreshold = (unsigned) topology->getPropInt64("@continuationCompressThreshold", 1024); diff --git a/roxie/ccd/ccdstate.cpp b/roxie/ccd/ccdstate.cpp index 1b239971d9c..2108347a486 100644 --- a/roxie/ccd/ccdstate.cpp +++ b/roxie/ccd/ccdstate.cpp @@ -2439,6 +2439,16 @@ class CRoxiePackageSetManager : implements IRoxieQueryPackageManagerSet, impleme defaultWarnTimeLimit[2] = control->getPropInt("@limit", 0); topology->setPropInt("@defaultSLAPriorityTimeWarning", defaultWarnTimeLimit[2]); } + else if (stricmp(queryName, "control:defaultBGPriorityTimeLimit")==0) + { + defaultTimeLimit[3] = control->getPropInt("@limit", 0); + topology->setPropInt("@defaultBGPriorityTimeLimit", defaultTimeLimit[3]); + } + else if (stricmp(queryName, "control:defaultBGPriorityTimeWarning")==0) + { + defaultWarnTimeLimit[3] = control->getPropInt("@limit", 0); + topology->setPropInt("@defaultBGPriorityTimeWarning", defaultWarnTimeLimit[3]); + } else if (stricmp(queryName, "control:deleteUnneededPhysicalFiles")==0) { UNIMPLEMENTED;