diff --git a/roxie/ccd/ccdactivities.cpp b/roxie/ccd/ccdactivities.cpp index 25404c2dffd..45534a5180f 100644 --- a/roxie/ccd/ccdactivities.cpp +++ b/roxie/ccd/ccdactivities.cpp @@ -2509,15 +2509,19 @@ class CRoxieKeyedActivity : public CRoxieAgentActivity else { IKeyIndexBase *kib = keyArray->queryKeyPart(lastPartNo.partNo); - assertex(kib != NULL); - IKeyIndex *k = kib->queryPart(lastPartNo.fileNo); - if (filechanged) + if (!kib) + tlk.clear(); + else { - tlk.setown(createLocalKeyManager(*keyRecInfo, k, &logctx, hasNewSegmentMonitors(), !logctx.isBlind())); - createSegmentMonitorsPending = true; + IKeyIndex *k = kib->queryPart(lastPartNo.fileNo); + if (filechanged || !tlk) + { + tlk.setown(createLocalKeyManager(*keyRecInfo, k, &logctx, hasNewSegmentMonitors(), !logctx.isBlind())); + createSegmentMonitorsPending = true; + } + else + tlk->setKey(k); } - else - tlk->setKey(k); } } diff --git a/roxie/ccd/ccdserver.cpp b/roxie/ccd/ccdserver.cpp index f893e2cbeab..ca8ef5ca411 100644 --- a/roxie/ccd/ccdserver.cpp +++ b/roxie/ccd/ccdserver.cpp @@ -1501,7 +1501,11 @@ class CRoxieServerActivity : implements CInterfaceOf, impl virtual IEngineRowStream *queryConcreteOutputStream(unsigned whichInput) { assertex(whichInput==0); return this; } virtual IStrandJunction *queryConcreteOutputJunction(unsigned idx) const { assertex(idx==0); return junction; } virtual IRoxieServerActivity *queryActivity() { return this; } - virtual IIndexReadActivityInfo *queryIndexReadActivity() { return NULL; } + virtual IIndexReadActivityInfo *queryIndexReadActivity() + { + CTXLOG("Activity does not implement queryIndexReadActivity"); + return NULL; + } virtual bool needsAllocator() const { return false; } @@ -5527,6 +5531,19 @@ IRoxieServerActivityFactory *createRoxieServerApplyActivityFactory(unsigned _id, //================================================================================= +static class CDummyIndexReadInfo : public CInterfaceOf +{ + RemoteActivityId dummyRemoteId{0,0}; +public: + virtual IKeyArray *getKeySet() const { return nullptr; } + virtual const IResolvedFile *getVarFileInfo() const { return nullptr; } + virtual ITranslatorSet *getTranslators() const { return nullptr; } + + virtual void mergeSegmentMonitors(IIndexReadContext *irc) const { } + virtual IRoxieServerActivity *queryActivity() { return nullptr; }; + virtual const RemoteActivityId &queryRemoteId() const { return dummyRemoteId; } +} dummyIndexReadInfo; + class CRoxieServerNullActivity : public CRoxieServerActivity { public: @@ -5540,6 +5557,10 @@ class CRoxieServerNullActivity : public CRoxieServerActivity return NULL; } + virtual IIndexReadActivityInfo *queryIndexReadActivity() + { + return &dummyIndexReadInfo; + } }; IRoxieServerActivity * createRoxieServerNullActivity(IRoxieAgentContext *_ctx, const IRoxieServerActivityFactory *_factory, IProbeManager *_probeManager) @@ -21211,7 +21232,7 @@ class CRoxieServerIfActivity : public CRoxieServerActivity IFinalRoxieInput *in = cond ? inputTrue : inputFalse; if (in) return in->queryIndexReadActivity(); - return NULL; + return &dummyIndexReadInfo; } virtual void reset() diff --git a/testing/regress/ecl/stresstext_if.ecl b/testing/regress/ecl/stresstext_if.ecl index 3cff2788ad6..879a4369740 100644 --- a/testing/regress/ecl/stresstext_if.ecl +++ b/testing/regress/ecl/stresstext_if.ecl @@ -18,17 +18,17 @@ //nothor //nohthor -//version multiPart=false -//version multiPart=true -//version multiPart=true,variant='inplace' -//version multiPart=true,variant='default' -//version multiPart=true,variant='inplace',conditionVersion=2 -//version multiPart=true,variant='inplace',conditionVersion=3 -//version multiPart=true,variant='',conditionVersion=2 +//xversion multiPart=false +//xversion multiPart=true +//xversion multiPart=true,variant='inplace' +//xversion multiPart=true,variant='default' +//xversion multiPart=true,variant='inplace',conditionVersion=2 +//xversion multiPart=true,variant='inplace',conditionVersion=3 +//xversion multiPart=true,variant='',conditionVersion=2 //The following is processed correctly by the code generator, but not yet supported by roxie //enable the test once the necessary changes are made in the roxie engine. -//noversion multiPart=true,variant='',conditionVersion=4 +//version multiPart=true,variant='',conditionVersion=4 // The settings below may be useful when trying to analyse Roxie keyed join behaviour, as they will // eliminate some wait time for an agent queue to become available