Skip to content

Commit 61189d3

Browse files
committed
Merge remote-tracking branch 'origin/candidate-9.8.x'
Signed-off-by: Jake Smith <jake.smith@lexisnexisrisk.com>
2 parents a0f5c78 + 585132d commit 61189d3

35 files changed

+3654
-4544
lines changed

.github/workflows/build-test-eclwatch.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
build:
2626
strategy:
2727
matrix:
28-
node: ["20", "18", "16"]
28+
node: ["22", "20", "18"]
2929
fail-fast: false
3030
name: "Check eclwatch and npm"
3131
needs: pre_job
@@ -44,6 +44,12 @@ jobs:
4444
- name: Install Dependencies
4545
working-directory: ./esp/src
4646
run: npm ci
47+
- name: Lint
48+
working-directory: ./esp/src
49+
run: npm run lint
50+
- name: Install Playwright browsers
51+
working-directory: ./esp/src
52+
run: npx playwright install --with-deps
4753
- name: Build
4854
working-directory: ./esp/src
4955
run: npm run build

dali/base/dadfs.cpp

+39
Original file line numberDiff line numberDiff line change
@@ -13849,6 +13849,45 @@ void configurePreferredPlanes()
1384913849
}
1385013850
}
1385113851

13852+
static bool doesPhysicalMatchMeta(IPropertyTree &partProps, IFile &iFile, offset_t expectedSize, offset_t &actualSize)
13853+
{
13854+
// NB: temporary workaround for 'narrow' files publishing extra empty parts with the wrong @compressedSize(0)
13855+
// causing a new check introduced in HPCC-33064 to be hit (fixed in HPCC-33113, but will continue to affect exiting files)
13856+
unsigned __int64 size = partProps.getPropInt64("@size", unknownFileSize);
13857+
unsigned __int64 compressedSize = partProps.getPropInt64("@compressedSize", unknownFileSize);
13858+
if ((0 == size) && (0 == compressedSize))
13859+
{
13860+
actualSize = unknownFileSize;
13861+
return true;
13862+
}
13863+
13864+
if (expectedSize != unknownFileSize)
13865+
{
13866+
actualSize = iFile.size();
13867+
if (actualSize != expectedSize)
13868+
return false;
13869+
}
13870+
else
13871+
actualSize = unknownFileSize;
13872+
13873+
return true;
13874+
}
13875+
13876+
bool doesPhysicalMatchMeta(IPartDescriptor &partDesc, IFile &iFile, offset_t &expectedSize, offset_t &actualSize)
13877+
{
13878+
IPropertyTree &partProps = partDesc.queryProperties();
13879+
expectedSize = partDesc.getDiskSize(false, false);
13880+
return doesPhysicalMatchMeta(partProps, iFile, expectedSize, actualSize);
13881+
}
13882+
13883+
bool doesPhysicalMatchMeta(IDistributedFilePart &part, IFile &iFile, offset_t &expectedSize, offset_t &actualSize)
13884+
{
13885+
IPropertyTree &partProps = part.queryAttributes();
13886+
expectedSize = part.getDiskSize(false, false);
13887+
return doesPhysicalMatchMeta(partProps, iFile, expectedSize, actualSize);
13888+
}
13889+
13890+
1385213891
#ifdef _USE_CPPUNIT
1385313892
/*
1385413893
* This method removes files only logically. removeEntry() used to do that, but the only

dali/base/dadfs.hpp

+4
Original file line numberDiff line numberDiff line change
@@ -925,4 +925,8 @@ inline cost_type getLegacyWriteCost(const IPropertyTree & fileAttr, Source sourc
925925
else
926926
return 0;
927927
}
928+
929+
extern da_decl bool doesPhysicalMatchMeta(IPartDescriptor &partDesc, IFile &iFile, offset_t &expectedSize, offset_t &actualSize);
930+
extern da_decl bool doesPhysicalMatchMeta(IDistributedFilePart &partDesc, IFile &iFile, offset_t &expectedSize, offset_t &actualSize);
931+
928932
#endif

dali/daliadmin/daadmin.cpp

+75
Original file line numberDiff line numberDiff line change
@@ -2557,6 +2557,81 @@ void xmlSize(const char *filename, double pc)
25572557
}
25582558
}
25592559

2560+
void loadXMLTest(const char *filename, bool parseOnly, bool useLowMemPTree, bool saveFormattedXML)
2561+
{
2562+
OwnedIFile iFile = createIFile(filename);
2563+
OwnedIFileIO iFileIO = iFile->open(IFOread);
2564+
if (!iFileIO)
2565+
{
2566+
WARNLOG("File '%s' not found", filename);
2567+
return;
2568+
}
2569+
2570+
class CDummyPTreeMaker : public CSimpleInterfaceOf<IPTreeMaker>
2571+
{
2572+
StringBuffer xpath;
2573+
unsigned level = 0;
2574+
public:
2575+
virtual IPropertyTree *queryRoot() override { return nullptr; }
2576+
virtual IPropertyTree *queryCurrentNode() override { return nullptr; }
2577+
virtual void reset() override { }
2578+
virtual IPropertyTree *create(const char *tag) override { return nullptr; }
2579+
// IPTreeNotifyEvent impl.
2580+
virtual void beginNode(const char *tag, bool sequence, offset_t startOffset) override { }
2581+
virtual void newAttribute(const char *name, const char *value) override { }
2582+
virtual void beginNodeContent(const char *tag) override { }
2583+
virtual void endNode(const char *tag, unsigned length, const void *value, bool binary, offset_t endOffset) override { }
2584+
};
2585+
2586+
byte flags=ipt_none;
2587+
PTreeReaderOptions readFlags=ptr_ignoreWhiteSpace;
2588+
Owned<IPTreeMaker> iMaker;
2589+
if (!parseOnly)
2590+
{
2591+
PROGLOG("Creating property tree from file: %s", filename);
2592+
byte flags = ipt_none;
2593+
if (useLowMemPTree)
2594+
{
2595+
PROGLOG("Using low memory property trees");
2596+
flags = ipt_lowmem;
2597+
}
2598+
iMaker.setown(createPTreeMaker(flags));
2599+
}
2600+
else
2601+
{
2602+
PROGLOG("Reading property tree from file (without creating it): %s", filename);
2603+
iMaker.setown(new CDummyPTreeMaker());
2604+
}
2605+
2606+
offset_t fSize = iFileIO->size();
2607+
OwnedIFileIOStream stream = createIOStream(iFileIO);
2608+
OwnedIFileIOStream progressedIFileIOStream = createProgressIFileIOStream(stream, fSize, "Load progress", 1);
2609+
Owned<IPTreeReader> reader = createXMLStreamReader(*progressedIFileIOStream, *iMaker, readFlags);
2610+
2611+
ProcessInfo memInfo(ReadMemoryInfo);
2612+
__uint64 rss = memInfo.getActiveResidentMemory();
2613+
CCycleTimer timer;
2614+
reader->load();
2615+
memInfo.update(ReadMemoryInfo);
2616+
__uint64 rssUsed = memInfo.getActiveResidentMemory() - rss;
2617+
reader.clear();
2618+
progressedIFileIOStream.clear();
2619+
PROGLOG("Load took: %.2f - RSS consumed: %.2f MB", (float)timer.elapsedMs()/1000, (float)rssUsed/0x100000);
2620+
2621+
if (!parseOnly && saveFormattedXML)
2622+
{
2623+
assertex(iMaker->queryRoot());
2624+
StringBuffer outFilename(filename);
2625+
outFilename.append(".out.xml");
2626+
PROGLOG("Saving to %s", outFilename.str());
2627+
timer.reset();
2628+
saveXML(outFilename, iMaker->queryRoot(), 2);
2629+
PROGLOG("Save took: %.2f", (float)timer.elapsedMs()/1000);
2630+
}
2631+
2632+
::LINK(iMaker->queryRoot()); // intentionally leak (avoid time clearing up)
2633+
}
2634+
25602635
void translateToXpath(const char *logicalfile, DfsXmlBranchKind tailType)
25612636
{
25622637
CDfsLogicalFileName lfn;

dali/daliadmin/daadmin.hpp

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ namespace daadmin
2828

2929
extern DALIADMIN_API void setDaliConnectTimeoutMs(unsigned timeoutMs);
3030
extern DALIADMIN_API void xmlSize(const char *filename, double pc);
31+
extern DALIADMIN_API void loadXMLTest(const char *filename, bool parseOnly, bool useLowMemPTree, bool saveFormattedXML);
3132
extern DALIADMIN_API void translateToXpath(const char *logicalfile, DfsXmlBranchKind tailType = DXB_File);
3233

3334
extern DALIADMIN_API void exportToFile(const char *path, const char *filename, bool safe = false);

dali/daliadmin/daliadmin.cpp

+15
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ void usage(const char *exe)
9999
printf(" dalilocks [ <ip-pattern> ] [ files ] -- get all locked files/xpaths\n");
100100
printf(" daliping [ <num> ] -- time dali server connect\n");
101101
printf(" getxref <destxmlfile> -- get all XREF information\n");
102+
printf(" loadxml <srcxmlfile> [--lowmem[=<true|false]] -- use lowmem AtomPTree's\n"
103+
" [--parseonly[=<true|false]] -- parse the xml file, don't load it into dali\n"
104+
" [--savexml[=<true|false]] -- save and time the parsed xml\n");
102105
printf(" migratefiles <src-group> <target-group> [<filemask>] [dryrun] [createmaps] [listonly] [verbose]\n");
103106
printf(" mpping <server-ip> -- time MP connect\n");
104107
printf(" serverlist <mask> -- list server IPs (mask optional)\n");
@@ -230,6 +233,18 @@ int main(int argc, const char* argv[])
230233
}
231234
else if (strieq(cmd, "remotetest"))
232235
remoteTest(params.item(1), false);
236+
else if (strieq(cmd, "loadxml"))
237+
{
238+
bool useLowMemPTree = false;
239+
bool saveFormatedTree = false;
240+
bool parseOnly = getComponentConfigSP()->getPropBool("@parseonly");
241+
if (!parseOnly)
242+
{
243+
useLowMemPTree = getComponentConfigSP()->getPropBool("@lowmem");
244+
saveFormatedTree = getComponentConfigSP()->getPropBool("@savexml");
245+
}
246+
loadXMLTest(params.item(1), parseOnly, useLowMemPTree, saveFormatedTree);
247+
}
233248
else
234249
{
235250
UERRLOG("Unknown command %s",cmd);

docs/EN_US/ContainerizedHPCC/ContainerizedHPCCSystemsPlatform.xml

+2
Original file line numberDiff line numberDiff line change
@@ -227,4 +227,6 @@
227227

228228
<xi:include href="ContainerizedHPCC/ContainerizedMods/ContainerLogging.xml"
229229
xmlns:xi="http://www.w3.org/2001/XInclude" />
230+
<xi:include href="ContainerizedHPCC/ContainerizedMods/TroubleshootingHelmDeployments.xml"
231+
xmlns:xi="http://www.w3.org/2001/XInclude" />
230232
</book>

0 commit comments

Comments
 (0)