diff --git a/common/thorhelper/thorsoapcall.cpp b/common/thorhelper/thorsoapcall.cpp index a03151e0d31..16a3fba6e39 100644 --- a/common/thorhelper/thorsoapcall.cpp +++ b/common/thorhelper/thorsoapcall.cpp @@ -254,7 +254,7 @@ class Url : public CInterface, implements IInterface } }; -//if Url was globally accessible we can define this in jtrace instead +//If the above Url class was centrally located, we could define this in jtrace instead. //http span standards documented here: https://opentelemetry.io/docs/specs/semconv/http/http-spans/ void setSpanURLAttributes(ISpan * clientSpan, const Url & url) { @@ -988,6 +988,7 @@ class CWSCHelper : implements IWSCHelper, public CInterface const IContextLogger &_logctx, IRoxieAbortMonitor *_roxieAbortMonitor, WSCType _wscType) : logctx(_logctx), outputAllocator(_outputAllocator), clientCert(_clientCert), roxieAbortMonitor(_roxieAbortMonitor) { + activitySpanScope.setown(logctx.queryActiveSpan()->createInternalSpan(_wscType == STsoap ? "SoapCall Activity": "HTTPCall Activity")); wscMode = _wscMode; wscType = _wscType; done = 0; @@ -1053,11 +1054,11 @@ class CWSCHelper : implements IWSCHelper, public CInterface s.setown(helper->getXpathHintsXml()); xpathHints.setown(createPTreeFromXMLString(s.get())); } - VStringBuffer spanName("SoapCallActivity %s", helper->getService()); - activitySpanScope.setown(logctx.queryActiveSpan()->createInternalSpan(spanName)); + if (wscType == STsoap) { soapaction.set(s.setown(helper->getSoapAction())); + activitySpanScope->setSpanAttribute("activity.soapaction", soapaction.str()); if(soapaction.get() && !isValidHttpValue(soapaction.get())) throw MakeStringException(-1, "SOAPAction value contained illegal characters: %s", soapaction.get()); @@ -1105,7 +1106,7 @@ class CWSCHelper : implements IWSCHelper, public CInterface service.set(s.setown(helper->getService())); service.trim(); - + activitySpanScope->setSpanAttribute("activity.service", service.str()); if (wscType == SThttp) { service.toUpperCase(); //GET/PUT/POST @@ -1127,9 +1128,9 @@ class CWSCHelper : implements IWSCHelper, public CInterface OwnedRoxieString hostsString(helper->getHosts()); const char *hosts = hostsString.get(); - if (isEmptyString(hosts)) throw MakeStringException(0, "%s specified no URLs", getWsCallTypeName(wscType)); + activitySpanScope->setSpanAttribute("activity.hosts", hosts); if (0==strncmp(hosts, "mtls:", 5)) { clientCertIssuer.set("local"); @@ -1202,6 +1203,7 @@ class CWSCHelper : implements IWSCHelper, public CInterface if (wscMode == SCrow) { + activitySpanScope->setSpanAttribute("activity.mode", "SCrow"); numRowThreads = 1; numUrlThreads = helper->numParallelThreads(); @@ -1214,6 +1216,7 @@ class CWSCHelper : implements IWSCHelper, public CInterface } else { + activitySpanScope->setSpanAttribute("activity.mode", "SCdataset"); unsigned totThreads = helper->numParallelThreads(); if (totThreads < 1) totThreads = 2; // default to 2 threads @@ -2454,9 +2457,7 @@ class CWSCAsyncFor : implements IWSCAsyncFor, public CInterface, public CAsyncFo unsigned retryInterval = 0; Url &url = master->urlArray.item(idx); - createHttpRequest(url, request); - unsigned startidx = idx; while (!master->aborted) { @@ -2478,9 +2479,8 @@ class CWSCAsyncFor : implements IWSCAsyncFor, public CInterface, public CAsyncFo checkTimeLimitExceeded(&remainingMS); // after ep.set which might make a potentially long getaddrinfo lookup ... if (strieq(url.method, "https")) - { proto = PersistentProtocol::ProtoTLS; - } + bool shouldClose = false; Owned psock = master->usePersistConnections() ? persistentHandler->getAvailable(&ep, &shouldClose, proto) : nullptr; if (psock) @@ -2711,7 +2711,6 @@ class CWSCAsyncFor : implements IWSCAsyncFor, public CInterface, public CAsyncFo if (master->usePersistConnections() && isReused) persistentHandler->doneUsing(socket, false); - master->activitySpanScope->recordError(SpanError("Unknown exception in processQuery", -1, true, true)); throw MakeStringException(-1, "Unknown exception in processQuery"); } diff --git a/dali/ft/filecopy.cpp b/dali/ft/filecopy.cpp index d93ade88777..c92f42fbd86 100644 --- a/dali/ft/filecopy.cpp +++ b/dali/ft/filecopy.cpp @@ -3573,17 +3573,30 @@ void FileSprayer::updateTargetProperties() } // Update @writeCost and @numWrites in subfile properties and update totalWriteCost - if (superTgt) + if (superTgt && superTgt->numSubFiles() > 0) { if (cur.whichOutput != (unsigned)-1) { - unsigned targetPartNum = targets.item(cur.whichOutput).partNum; - IDistributedFile &subfile = superTgt->querySubFile(targetPartNum, true); - DistributedFilePropertyLock lock(&subfile); + IDistributedFile *subfile; + if (superTgt->numSubFiles() > 1) + { + Owned fDesc = superTgt->getFileDescriptor(); + ISuperFileDescriptor *superFDesc = fDesc->querySuperFileDescriptor(); + unsigned subfileNum, subFilePartNum; + superFDesc->mapSubPart(targets.item(cur.whichOutput).partNum, subfileNum, subFilePartNum); + subfile = superTgt->querySubPart(subfileNum, subFilePartNum); + } + else + { + // If there is a single subfile, it is not necessary to map part to subfile + // (also, querySuperFileDescriptor return nullptr if num subfile == 1) + subfile = &superTgt->querySubFile(0); + } + DistributedFilePropertyLock lock(subfile); IPropertyTree &subFileProps = lock.queryAttributes(); cost_type prevNumWrites = subFileProps.getPropInt64(getDFUQResultFieldName(DFUQRFnumDiskWrites)); cost_type prevWriteCost = subFileProps.getPropInt64(getDFUQResultFieldName(DFUQRFwriteCost)); - cost_type curWriteCost = calcFileAccessCost(&subfile, curProgress.numWrites, 0); + cost_type curWriteCost = calcFileAccessCost(subfile, curProgress.numWrites, 0); subFileProps.setPropInt64(getDFUQResultFieldName(DFUQRFwriteCost), prevWriteCost + curWriteCost); subFileProps.setPropInt64(getDFUQResultFieldName(DFUQRFnumDiskWrites), prevNumWrites + curProgress.numWrites); totalWriteCost += curWriteCost; @@ -3786,23 +3799,35 @@ void FileSprayer::updateTargetProperties() if (distributedSource) { IDistributedSuperFile * superSrc = distributedSource->querySuperFile(); - if (superSrc) + if (superSrc && superSrc->numSubFiles() > 0) { + Owned fDesc = superSrc->getFileDescriptor(); + ISuperFileDescriptor *superFDesc = fDesc->querySuperFileDescriptor(); ForEachItemIn(idx, partition) { PartitionPoint & cur = partition.item(idx); OutputProgress & curProgress = progress.item(idx); - if (cur.whichInput != (unsigned)-1) { - unsigned sourcePartNum = sources.item(cur.whichInput).partNum; - IDistributedFile &subfile = superSrc->querySubFile(sourcePartNum, true); - DistributedFilePropertyLock lock(&subfile); + IDistributedFile *subfile; + if (superFDesc) + { + unsigned subfileNum, subFilePartNum; + superFDesc->mapSubPart(sources.item(cur.whichInput).partNum, subfileNum, subFilePartNum); + subfile = superSrc->querySubPart(subfileNum, subFilePartNum); + } + else + { + // superFDesc==nullptr if there is a single file + // so query the first (and only) subfile + subfile = &superSrc->querySubFile(0); + } + DistributedFilePropertyLock lock(subfile); IPropertyTree &subFileProps = lock.queryAttributes(); stat_type prevNumReads = subFileProps.getPropInt64(getDFUQResultFieldName(DFUQRFnumDiskReads), 0); - cost_type legacyReadCost = getLegacyReadCost(subfile.queryAttributes(), &subfile); + cost_type legacyReadCost = getLegacyReadCost(subfile->queryAttributes(), subfile); cost_type prevReadCost = subFileProps.getPropInt64(getDFUQResultFieldName(DFUQRFreadCost), 0); - cost_type curReadCost = calcFileAccessCost(&subfile, 0, curProgress.numReads); + cost_type curReadCost = calcFileAccessCost(subfile, 0, curProgress.numReads); subFileProps.setPropInt64(getDFUQResultFieldName(DFUQRFnumDiskReads), prevNumReads + curProgress.numReads); subFileProps.setPropInt64(getDFUQResultFieldName(DFUQRFreadCost), legacyReadCost + prevReadCost + curReadCost); totalReadCost += curReadCost; diff --git a/ecl/hql/CMakeLists.txt b/ecl/hql/CMakeLists.txt index f1a76567b09..32ea50dadaa 100644 --- a/ecl/hql/CMakeLists.txt +++ b/ecl/hql/CMakeLists.txt @@ -167,6 +167,9 @@ if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG) #Compiler complains about an unused function yyunput, and make sure that any warnings are not reported as errors set_source_files_properties (hqllex.cpp PROPERTIES COMPILE_FLAGS " -Wno-unused-function -Wno-error") + + #Compiler complains about a variable is set but not used + set_source_files_properties (hqlgram.cpp PROPERTIES COMPILE_FLAGS " -Wno-error=unused-but-set-variable -Wno-error=class-memaccess") endif() if (WIN32) diff --git a/ecl/hql/hqlexpr.cpp b/ecl/hql/hqlexpr.cpp index 57529bce0ae..82697abb382 100644 --- a/ecl/hql/hqlexpr.cpp +++ b/ecl/hql/hqlexpr.cpp @@ -1146,8 +1146,8 @@ void HqlParseContext::finishMeta(bool isSeparateFile, bool success, bool generat { #if 0 IPropertyTree* tos = curMeta().meta; -# This is disabled as the location of the cache file needs to be -# in the original location for now. This may re-visited in the future. +// This is disabled as the location of the cache file needs to be +// in the original location for now. This may re-visited in the future. if (isSeparateFile && hasCacheLocation()) { StringBuffer fullName; diff --git a/ecl/hqlcpp/hqlresource.cpp b/ecl/hqlcpp/hqlresource.cpp index 61bdc871029..3e722954d86 100644 --- a/ecl/hqlcpp/hqlresource.cpp +++ b/ecl/hqlcpp/hqlresource.cpp @@ -5549,7 +5549,9 @@ void EclResourcer::removeDuplicateIndependentLinks(CSplitterInfo & connections, ResourcerInfo & sinkInfo = *queryResourceInfo(sink); if (allInputsPulledIndependently(sink)) { +#ifdef TRACE_BALANCED unsigned numRemoved = 0; +#endif for (unsigned j=info.balancedLinks.ordinality()-1; j > i; j--) { CSplitterLink & next = info.balancedLinks.item(j); @@ -5557,7 +5559,9 @@ void EclResourcer::removeDuplicateIndependentLinks(CSplitterInfo & connections, { info.balancedLinks.remove(j); sinkInfo.balancedLinks.zap(next); +#ifdef TRACE_BALANCED numRemoved++; +#endif } } diff --git a/esp/src/src-react/components/Frame.tsx b/esp/src/src-react/components/Frame.tsx index 58967d6ff4d..60355ee8def 100644 --- a/esp/src/src-react/components/Frame.tsx +++ b/esp/src/src-react/components/Frame.tsx @@ -91,7 +91,7 @@ export const Frame: React.FunctionComponent = () => { }, []); React.useEffect(() => { - document.title = `${showEnvironmentTitle && environmentTitle.length ? environmentTitle : "ECL Watch "}${locationPathname.split("/").join(" | ")}`; + document.title = `${(showEnvironmentTitle && environmentTitle) ? environmentTitle : "ECL Watch "}${locationPathname.split("/").join(" | ")}`; }, [environmentTitle, locationPathname, showEnvironmentTitle]); React.useEffect(() => { diff --git a/esp/src/src-react/components/Title.tsx b/esp/src/src-react/components/Title.tsx index 9af34dfa076..ff235f3b50d 100644 --- a/esp/src/src-react/components/Title.tsx +++ b/esp/src/src-react/components/Title.tsx @@ -247,11 +247,6 @@ export const DevTitle: React.FunctionComponent = ({ } }, [currentUser]); - React.useEffect(() => { - if (!environmentTitle) return; - document.title = environmentTitle; - }, [environmentTitle]); - return
@@ -264,7 +259,7 @@ export const DevTitle: React.FunctionComponent = ({ - {showEnvironmentTitle && environmentTitle.length ? environmentTitle : "ECL Watch"} + {(showEnvironmentTitle && environmentTitle) ? environmentTitle : "ECL Watch"} diff --git a/helm/hpcc/Chart.yaml b/helm/hpcc/Chart.yaml index f0c4e4a4054..8ddd130af63 100644 --- a/helm/hpcc/Chart.yaml +++ b/helm/hpcc/Chart.yaml @@ -6,9 +6,9 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: 9.4.41-closedown0 +version: 9.4.43-closedown0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. -appVersion: 9.4.41-closedown0 +appVersion: 9.4.43-closedown0 diff --git a/helm/hpcc/templates/_helpers.tpl b/helm/hpcc/templates/_helpers.tpl index b52b5929b48..493af724e17 100644 --- a/helm/hpcc/templates/_helpers.tpl +++ b/helm/hpcc/templates/_helpers.tpl @@ -1501,7 +1501,7 @@ kind: Service metadata: name: {{ $lvars.serviceName | quote }} labels: - helmVersion: 9.4.41-closedown0 + helmVersion: 9.4.43-closedown0 {{- include "hpcc.addStandardLabels" (dict "root" $.root "instance" $lvars.serviceName ) | indent 4 }} {{- if $lvars.labels }} {{ toYaml $lvars.labels | indent 4 }} diff --git a/helm/hpcc/templates/dafilesrv.yaml b/helm/hpcc/templates/dafilesrv.yaml index 4553c3497fe..8314f27b730 100644 --- a/helm/hpcc/templates/dafilesrv.yaml +++ b/helm/hpcc/templates/dafilesrv.yaml @@ -51,7 +51,7 @@ spec: labels: {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "dafilesrv" "name" "dafilesrv" "instance" .name) | indent 8 }} server: {{ .name | quote }} - helmVersion: 9.4.41-closedown0 + helmVersion: 9.4.43-closedown0 annotations: checksum/config: {{ $configSHA }} {{- include "hpcc.generateAnnotations" $commonCtx | indent 8 }} diff --git a/helm/hpcc/templates/dali.yaml b/helm/hpcc/templates/dali.yaml index 8aadbf80c77..8f940717307 100644 --- a/helm/hpcc/templates/dali.yaml +++ b/helm/hpcc/templates/dali.yaml @@ -84,7 +84,7 @@ spec: run: {{ $dali.name | quote }} server: {{ $dali.name | quote }} app: dali - helmVersion: 9.4.41-closedown0 + helmVersion: 9.4.43-closedown0 {{- if hasKey $.Values.global "metrics" }} {{- include "hpcc.generateMetricsReporterLabel" $.Values.global.metrics | nindent 8 }} {{- end }} diff --git a/helm/hpcc/templates/dfuserver.yaml b/helm/hpcc/templates/dfuserver.yaml index 73f24e7c2ef..55ab4834628 100644 --- a/helm/hpcc/templates/dfuserver.yaml +++ b/helm/hpcc/templates/dfuserver.yaml @@ -57,7 +57,7 @@ spec: {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "dfuserver" "name" "dfuserver" "instance" .name) | indent 8 }} run: {{ .name | quote }} accessDali: "yes" - helmVersion: 9.4.41-closedown0 + helmVersion: 9.4.43-closedown0 {{- if hasKey . "labels" }} {{ toYaml .labels | indent 8 }} {{- end }} diff --git a/helm/hpcc/templates/eclagent.yaml b/helm/hpcc/templates/eclagent.yaml index 88d2cb86feb..3ca1121f043 100644 --- a/helm/hpcc/templates/eclagent.yaml +++ b/helm/hpcc/templates/eclagent.yaml @@ -60,7 +60,7 @@ data: {{- include "hpcc.addStandardLabels" (dict "root" $ "component" $apptype "name" "eclagent" "instance" $appJobName "instanceOf" (printf "%s-job" .me.name)) | indent 12 }} accessDali: "yes" accessEsp: "yes" - helmVersion: 9.4.41-closedown0 + helmVersion: 9.4.43-closedown0 {{- if hasKey .me "labels" }} {{ toYaml .me.labels | indent 12 }} {{- end }} @@ -137,7 +137,7 @@ spec: run: {{ .name | quote }} accessDali: "yes" accessEsp: {{ .useChildProcesses | default false | ternary "yes" "no" | quote }} - helmVersion: 9.4.41-closedown0 + helmVersion: 9.4.43-closedown0 {{- if hasKey . "labels" }} {{ toYaml .labels | indent 8 }} {{- end }} diff --git a/helm/hpcc/templates/eclccserver.yaml b/helm/hpcc/templates/eclccserver.yaml index 50f1aeeffc5..68000adb1bc 100644 --- a/helm/hpcc/templates/eclccserver.yaml +++ b/helm/hpcc/templates/eclccserver.yaml @@ -58,7 +58,7 @@ data: {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "eclccserver" "name" "eclccserver" "instance" $compileJobName "instanceOf" (printf "%s-job" .me.name)) | indent 12 }} accessDali: "yes" accessEsp: "yes" - helmVersion: 9.4.41-closedown0 + helmVersion: 9.4.43-closedown0 {{- if hasKey .me "labels" }} {{ toYaml .me.labels | indent 12 }} {{- end }} @@ -143,7 +143,7 @@ spec: run: {{ .name | quote }} accessDali: "yes" accessEsp: {{ .useChildProcesses | default false | ternary "yes" "no" | quote }} - helmVersion: 9.4.41-closedown0 + helmVersion: 9.4.43-closedown0 {{- if hasKey . "labels" }} {{ toYaml .labels | indent 8 }} {{- end }} diff --git a/helm/hpcc/templates/eclscheduler.yaml b/helm/hpcc/templates/eclscheduler.yaml index c9a85e4b523..6a0d68385dc 100644 --- a/helm/hpcc/templates/eclscheduler.yaml +++ b/helm/hpcc/templates/eclscheduler.yaml @@ -65,7 +65,7 @@ spec: run: {{ .name | quote }} accessDali: "yes" accessEsp: "no" - helmVersion: 9.4.41-closedown0 + helmVersion: 9.4.43-closedown0 {{- if hasKey . "labels" }} {{ toYaml .labels | indent 8 }} {{- end }} diff --git a/helm/hpcc/templates/esp.yaml b/helm/hpcc/templates/esp.yaml index 0f6d42fe71e..a98f626918f 100644 --- a/helm/hpcc/templates/esp.yaml +++ b/helm/hpcc/templates/esp.yaml @@ -122,7 +122,7 @@ spec: accessSasha: "yes" {{- end }} app: {{ $application }} - helmVersion: 9.4.41-closedown0 + helmVersion: 9.4.43-closedown0 {{- include "hpcc.addStandardLabels" (dict "root" $ "name" $application "component" "esp" "instance" .name) | indent 8 }} {{- if hasKey $.Values.global "metrics" }} {{- include "hpcc.generateMetricsReporterLabel" $.Values.global.metrics | nindent 8 }} diff --git a/helm/hpcc/templates/localroxie.yaml b/helm/hpcc/templates/localroxie.yaml index 6013ddec3bb..42534212775 100644 --- a/helm/hpcc/templates/localroxie.yaml +++ b/helm/hpcc/templates/localroxie.yaml @@ -73,7 +73,7 @@ spec: server: {{ $servername | quote }} accessDali: "yes" accessEsp: "yes" - helmVersion: 9.4.41-closedown0 + helmVersion: 9.4.43-closedown0 {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "roxie-server" "name" "roxie" "instance" $roxie.name) | indent 8 }} {{- if hasKey . "labels" }} {{ toYaml .labels | indent 8 }} diff --git a/helm/hpcc/templates/roxie.yaml b/helm/hpcc/templates/roxie.yaml index 57f8d523ded..6ac27dc43c9 100644 --- a/helm/hpcc/templates/roxie.yaml +++ b/helm/hpcc/templates/roxie.yaml @@ -125,7 +125,7 @@ spec: {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "topology-server" "name" "roxie" "instance" $commonCtx.toponame) | indent 8 }} run: {{ $commonCtx.toponame | quote }} roxie-cluster: {{ $roxie.name | quote }} - helmVersion: 9.4.41-closedown0 + helmVersion: 9.4.43-closedown0 {{- if hasKey $.Values.global "metrics" }} {{- include "hpcc.generateMetricsReporterLabel" $.Values.global.metrics | nindent 8}} {{- end }} @@ -183,7 +183,7 @@ kind: Service metadata: name: {{ $commonCtx.toponame | quote }} labels: - helmVersion: 9.4.41-closedown0 + helmVersion: 9.4.43-closedown0 {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "topology-server" "name" "roxie" "instance" $commonCtx.toponame) | indent 4 }} spec: ports: @@ -245,7 +245,7 @@ spec: roxie-cluster: {{ $roxie.name | quote }} accessDali: "yes" accessEsp: "yes" - helmVersion: 9.4.41-closedown0 + helmVersion: 9.4.43-closedown0 {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "roxie-server" "name" "roxie" "instance" $servername) | indent 8 }} {{- if hasKey $.Values.global "metrics" }} {{- include "hpcc.generateMetricsReporterLabel" $.Values.global.metrics | nindent 8}} @@ -353,7 +353,7 @@ spec: roxie-cluster: {{ $roxie.name | quote }} accessDali: "yes" accessEsp: "yes" - helmVersion: 9.4.41-closedown0 + helmVersion: 9.4.43-closedown0 {{- if hasKey $.Values.global "metrics" }} {{- include "hpcc.generateMetricsReporterLabel" $.Values.global.metrics | nindent 8}} {{- end }} diff --git a/helm/hpcc/templates/sasha.yaml b/helm/hpcc/templates/sasha.yaml index 7a3dd69bdb7..bbb75f14322 100644 --- a/helm/hpcc/templates/sasha.yaml +++ b/helm/hpcc/templates/sasha.yaml @@ -53,7 +53,7 @@ spec: server: {{ $serviceName | quote }} app: sasha accessDali: {{ (has "dali" $sasha.access) | ternary "yes" "no" | quote }} - helmVersion: 9.4.41-closedown0 + helmVersion: 9.4.43-closedown0 {{- if hasKey $sasha "labels" }} {{ toYaml $sasha.labels | indent 8 }} {{- end }} diff --git a/helm/hpcc/templates/thor.yaml b/helm/hpcc/templates/thor.yaml index 13c617f0459..6dba5ea1e6d 100644 --- a/helm/hpcc/templates/thor.yaml +++ b/helm/hpcc/templates/thor.yaml @@ -86,7 +86,7 @@ data: labels: accessDali: "yes" accessEsp: "yes" - helmVersion: 9.4.41-closedown0 + helmVersion: 9.4.43-closedown0 {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "eclagent" "name" "thor" "instance" $eclAgentJobName "instanceOf" (printf "%s-job" .eclAgentName)) | indent 8 }} {{- if hasKey .me "labels" }} {{ toYaml .me.labels | indent 12 }} @@ -151,7 +151,7 @@ data: accessEsp: "yes" app: "thor" component: "thormanager" - helmVersion: 9.4.41-closedown0 + helmVersion: 9.4.43-closedown0 instance: "_HPCC_JOBNAME_" job: "_HPCC_JOBNAME_" {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "thormanager" "name" "thor" "instance" $thorManagerJobName "instanceOf" (printf "%s-thormanager-job" .me.name)) | indent 12 }} @@ -218,7 +218,7 @@ data: accessEsp: "yes" app: "thor" component: "thorworker" - helmVersion: 9.4.41-closedown0 + helmVersion: 9.4.43-closedown0 instance: "_HPCC_JOBNAME_" job: "_HPCC_JOBNAME_" {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "thorworker" "name" "thor" "instance" $thorWorkerJobName "instanceOf" (printf "%s-thorworker-job" .me.name)) | indent 12 }} @@ -351,7 +351,7 @@ spec: accessEsp: {{ $commonCtx.eclAgentUseChildProcesses | ternary "yes" "no" | quote }} app: "thor" component: "thor-eclagent" - helmVersion: 9.4.41-closedown0 + helmVersion: 9.4.43-closedown0 instance: {{ $commonCtx.eclAgentName | quote }} {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "eclagent" "name" "thor" "instance" $commonCtx.eclAgentName ) | indent 8 }} {{- if hasKey $commonCtx.me "labels" }} @@ -416,7 +416,7 @@ spec: accessEsp: "no" app: "thor" component: "thor-thoragent" - helmVersion: 9.4.41-closedown0 + helmVersion: 9.4.43-closedown0 instance: {{ $commonCtx.thorAgentName | quote }} {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "eclagent" "name" "thor" "instance" $commonCtx.thorAgentName ) | indent 8 }} {{- if hasKey $commonCtx.me "labels" }} diff --git a/roxie/ccd/ccdqueue.cpp b/roxie/ccd/ccdqueue.cpp index 401d2334969..3b405034d3b 100644 --- a/roxie/ccd/ccdqueue.cpp +++ b/roxie/ccd/ccdqueue.cpp @@ -1262,7 +1262,6 @@ class RoxieQueue : public CInterface, implements IThreadFactory bool remove(RoxiePacketHeader &x) { - unsigned scanLength = 0; ISerializedRoxieQueryPacket *found = nullptr; { CriticalBlock qc(qcrit); @@ -1273,7 +1272,6 @@ class RoxieQueue : public CInterface, implements IThreadFactory ISerializedRoxieQueryPacket *queued = waiting.item(i); if (queued) { - scanLength++; if (queued->queryHeader().matchPacket(x)) { waiting.set(i, NULL); diff --git a/system/jhtree/jhtree.cpp b/system/jhtree/jhtree.cpp index 26264459d8f..be4413d4356 100644 --- a/system/jhtree/jhtree.cpp +++ b/system/jhtree/jhtree.cpp @@ -626,7 +626,7 @@ class CNodeCacheEntry : public CInterface public: CriticalSection cs; private: - std::atomic node = nullptr; + std::atomic node{nullptr}; public: ~CNodeCacheEntry() { diff --git a/system/jlib/jdebug.cpp b/system/jlib/jdebug.cpp index 3aea22a4add..c5608e1b00f 100644 --- a/system/jlib/jdebug.cpp +++ b/system/jlib/jdebug.cpp @@ -3286,7 +3286,6 @@ void printProcMap(const char *fn, bool printbody, bool printsummary, StringBuffe } while (reader.nextln()) { const char *ln = reader.ln; - unsigned n=0; if (*ln) { offset_t start = readHexNum(ln); if (last&&(last!=start)) { @@ -3360,7 +3359,6 @@ void printProcMap(const char *fn, bool printbody, bool printsummary, StringBuffe recs[t].total += ssz; if (ssz>recs[t].largest) recs[t].largest = ssz; - n++; last = end; #ifndef __64BIT__ if ((end<0xffffffff)&&(end>=0xc0000000)) // rest is OS (32-bit only) diff --git a/testing/unittests/jlibtests.cpp b/testing/unittests/jlibtests.cpp index 238e646a51e..ba972fc220a 100644 --- a/testing/unittests/jlibtests.cpp +++ b/testing/unittests/jlibtests.cpp @@ -65,6 +65,7 @@ class JlibTraceTest : public CppUnit::TestFixture CPPUNIT_TEST(testEnsureTraceID); CPPUNIT_TEST(manualTestsEventsOutput); CPPUNIT_TEST(manualTestsDeclaredFailures); + CPPUNIT_TEST(manualTestScopeEnd); //CPPUNIT_TEST(testJTraceJLOGExporterprintResources); //CPPUNIT_TEST(testJTraceJLOGExporterprintAttributes); @@ -196,7 +197,7 @@ class JlibTraceTest : public CppUnit::TestFixture { Owned emptyMockHTTPHeaders = createProperties(); { - Owned serverSpan = queryTraceManager().createServerSpan("spanWithEventsNoAtts", emptyMockHTTPHeaders); + OwnedSpanScope serverSpan = queryTraceManager().createServerSpan("spanWithEventsNoAtts", emptyMockHTTPHeaders); Owned emptyEventAtts = createProperties(); serverSpan->addSpanEvent("event1", emptyEventAtts); } @@ -206,12 +207,12 @@ class JlibTraceTest : public CppUnit::TestFixture twoEventAtt->setProp("key2", ""); { - Owned serverSpan = queryTraceManager().createServerSpan("spanWithEvent1Att", emptyMockHTTPHeaders); + OwnedSpanScope serverSpan = queryTraceManager().createServerSpan("spanWithEvent1Att", emptyMockHTTPHeaders); serverSpan->addSpanEvent("event2", twoEventAtt); }//{ "type": "span", "name": "spanWithEvents1Att", "trace_id": "3b9f55aaf8fab51fb0d73a32db7d704f", "span_id": "2a25a44ae0b3abe0", "start": 1709696036335278770, "duration": 3363911469, "events":[ { "name": "event2", "time_stamp": 1709696038413023245, "attributes": {"key": "value" } } ] } { - Owned serverSpan = queryTraceManager().createServerSpan("spanWith2Events", emptyMockHTTPHeaders); + OwnedSpanScope serverSpan = queryTraceManager().createServerSpan("spanWith2Events", emptyMockHTTPHeaders); serverSpan->addSpanEvent("event1", twoEventAtt); serverSpan->addSpanEvent("event2", twoEventAtt); }//{ "type": "span", "name": "spanWith2Events", "trace_id": "ff5c5919b9c5f85913652b77f289bf0b", "span_id": "82f91ca1f9d469c1", "start": 1709698012480805016, "duration": 2811601377, "events":[ { "name": "event1", "time_stamp": 1709698013294323139, "attributes": {"key": "value" } },{ "name": "event2", "time_stamp": 1709698014500350802, "attributes": {"key": "value" } } ] } @@ -275,25 +276,25 @@ class JlibTraceTest : public CppUnit::TestFixture { Owned emptyMockHTTPHeaders = createProperties(); { - Owned serverSpan = queryTraceManager().createServerSpan("defaultErrorSpan", emptyMockHTTPHeaders); + OwnedSpanScope serverSpan = queryTraceManager().createServerSpan("defaultErrorSpan", emptyMockHTTPHeaders); serverSpan->recordError(); }//{ "type": "span", "name": "defaultErrorSpan", "trace_id": "209b5d8cea0aec9785d2dfa3117e37ad", "span_id": "ab72e76c2f2466c2", "start": 1709675278129335702, "duration": 188292867932, "status": "Error", "kind": "Server", "instrumented_library": "unittests", "events":[ { "name": "Exception", "time_stamp": 1709675465508149013, "attributes": {"escaped": 0 } } ] } { - Owned serverSpan = queryTraceManager().createServerSpan("defaultErrorSpanStruct", emptyMockHTTPHeaders); + OwnedSpanScope serverSpan = queryTraceManager().createServerSpan("defaultErrorSpanStruct", emptyMockHTTPHeaders); SpanError error; serverSpan->recordError(error); }//{ "type": "span", "name": "defaultErrorSpanStruct", "trace_id": "19803a446b971f2e0bdddc9c00db50fe", "span_id": "04c93a91ab8785a2", "start": 1709675487767044352, "duration": 2287497219, "status": "Error", "kind": "Server", "instrumented_library": "unittests", "events":[ { "name": "Exception", "time_stamp": 1709675489216412154, "attributes": {"escaped": 0 } } ] } { - Owned serverSpan = queryTraceManager().createServerSpan("failedErrorSpanEscaped", emptyMockHTTPHeaders); + OwnedSpanScope serverSpan = queryTraceManager().createServerSpan("failedErrorSpanEscaped", emptyMockHTTPHeaders); SpanError * error = new SpanError("hello"); error->setSpanStatus(true, true); serverSpan->recordError(*error); }//{ "type": "span", "name": "failedErrorSpanEscaped", "trace_id": "634f386c18a6140544c980e0d5a15905", "span_id": "e2f59c48f63a8f82", "start": 1709675508231168974, "duration": 7731717678, "status": "Error", "kind": "Server", "description": "hello", "instrumented_library": "unittests", "events":[ { "name": "Exception", "time_stamp": 1709675512164430668, "attributes": {"escaped": 1,"message": "hello" } } ] } { - Owned serverSpan = queryTraceManager().createServerSpan("failedErrEscapedMsgErrCode", emptyMockHTTPHeaders); + OwnedSpanScope serverSpan = queryTraceManager().createServerSpan("failedErrEscapedMsgErrCode", emptyMockHTTPHeaders); SpanError * error = new SpanError(); error->setSpanStatus(true, true); error->setError("hello", 34); @@ -301,22 +302,22 @@ class JlibTraceTest : public CppUnit::TestFixture }//failedErrEscapedMsgErrCode { - Owned serverSpan = queryTraceManager().createServerSpan("containsErrorAndMessageSpan", emptyMockHTTPHeaders); + OwnedSpanScope serverSpan = queryTraceManager().createServerSpan("containsErrorAndMessageSpan", emptyMockHTTPHeaders); serverSpan->recordError(SpanError("Error Message!!")); }//{ "type": "span", "name": "containsErrorAndMessageSpan", "trace_id": "9a6e00ea309bc0427733f9b2d452f9e2", "span_id": "de63e9c69b64e411", "start": 1709675552302360510, "duration": 5233037523, "status": "Error", "kind": "Server", "description": "Error Message!!", "instrumented_library": "unittests", "events":[ { "name": "Exception", "time_stamp": 1709675555149852711, "attributes": {"escaped": 0,"message": "Error Message!!" } } { - Owned serverSpan = queryTraceManager().createServerSpan("containsErrorAndMessageFailedNotEscapedSpan", emptyMockHTTPHeaders); + OwnedSpanScope serverSpan = queryTraceManager().createServerSpan("containsErrorAndMessageFailedNotEscapedSpan", emptyMockHTTPHeaders); serverSpan->recordError(SpanError("Error Message!!", 23, true, false)); }//{ "type": "span", "name": "containsErrorAndMessageFailedNotEscapedSpan", "trace_id": "02f4b2d215f8230b15063862f8a91e41", "span_id": "c665ec371d6db147", "start": 1709675573581678954, "duration": 3467489486, "status": "Error", "kind": "Server", "description": "Error Message!!", "instrumented_library": "unittests", "events":[ { "name": "Exception", "time_stamp": 1709675576145074240, "attributes": {"code": 23,"escaped": 0,"message": "Error Message!!" } } ] } { - Owned serverSpan = queryTraceManager().createServerSpan("mockExceptionSpanNotFailedNotEscaped", emptyMockHTTPHeaders); + OwnedSpanScope serverSpan = queryTraceManager().createServerSpan("mockExceptionSpanNotFailedNotEscaped", emptyMockHTTPHeaders); serverSpan->recordException( makeStringExceptionV(76,"Mock exception"), false, false); }//{ "type": "span", "name": "mockExceptionSpanNotFailedNotEscaped", "trace_id": "e01766474db05ce9085943fa3955cd73", "span_id": "7da620e96e10e42c", "start": 1709675595987480704, "duration": 2609091267, "status": "Unset", "kind": "Server", "instrumented_library": "unittests", "events":[ { "name": "Exception", "time_stamp": 1709675597728975355, "attributes": {"code": 76,"escaped": 0,"message": "Mock exception" } } ] { - Owned serverSpan = queryTraceManager().createServerSpan("thrownExceptionSpan", emptyMockHTTPHeaders); + OwnedSpanScope serverSpan = queryTraceManager().createServerSpan("thrownExceptionSpan", emptyMockHTTPHeaders); try { throw makeStringExceptionV( 356, "Mock thrown exception"); @@ -328,6 +329,28 @@ class JlibTraceTest : public CppUnit::TestFixture } }//{ "type": "span", "name": "thrownExceptionSpan", "trace_id": "4d6225e1cefdc6823d1134c71c522426", "span_id": "07f7bd070e008f53", "start": 1709675614823881961, "duration": 4665288686, "status": "Unset", "kind": "Server", "instrumented_library": "unittests", "events":[ { "name": "Exception", "time_stamp": 1709675616485586471, "attributes": {"code": 356,"escaped": 1,"message": "Mock thrown exception" } } ] } } + //not able to programmatically test yet, but can visually inspect trace output + void manualTestScopeEnd() + { + Owned savedSpan; + { + SpanFlags flags = SpanFlags::EnsureTraceId; + Owned emptyMockHTTPHeaders = createProperties(); + OwnedSpanScope serverSpan = queryTraceManager().createServerSpan("mySpan", emptyMockHTTPHeaders, flags); + DBGLOG("mySpan is alive"); + savedSpan.set(serverSpan); + }//{ "type": "span", "name": "mySpan", "trace_id": "fe266416e7d588113a5131394d913ab4", "span_id": "7ac62328b04442c5", "start": 1709824793826023368, "duration": 16952 } + //NB: Duration for the span should be << 100,000,000ns + //If logging is asynchronous the log message may appear after the following logging line + DBGLOG("mySpan is finished"); + Sleep(100); + + //Check that the attributes are still accessible even though the span has ended + Owned retrievedSpanCtxAttributes = createProperties(); + savedSpan->getSpanContext(retrievedSpanCtxAttributes.get()); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Unexpected empty TraceID detected", false, isEmptyString(retrievedSpanCtxAttributes->queryProp("traceID"))); + savedSpan.clear(); + } void testTraceDisableConfig() { diff --git a/tools/hidl/hidlcomp.cpp b/tools/hidl/hidlcomp.cpp index 93ec23cf067..f9dba61e2d7 100644 --- a/tools/hidl/hidlcomp.cpp +++ b/tools/hidl/hidlcomp.cpp @@ -2254,10 +2254,8 @@ void ModuleInfo::write_body_class() } outf("}, %d };\n\n",version); - int fn=0; for (ProcInfo *pi=procs; pi; pi=pi->next) { - fn++; pi->write_body_method_structs2(name); } outs("\n"); diff --git a/version.cmake b/version.cmake index 64412a8589d..1952e234114 100644 --- a/version.cmake +++ b/version.cmake @@ -5,8 +5,8 @@ set ( HPCC_NAME "Community Edition" ) set ( HPCC_PROJECT "community" ) set ( HPCC_MAJOR 9 ) set ( HPCC_MINOR 4 ) -set ( HPCC_POINT 41 ) +set ( HPCC_POINT 43 ) set ( HPCC_MATURITY "closedown" ) set ( HPCC_SEQUENCE 0 ) -set ( HPCC_TAG_TIMESTAMP "2024-02-29T16:47:59Z" ) +set ( HPCC_TAG_TIMESTAMP "2024-03-07T17:32:39Z" ) ###