Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/candidate-9.4.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
GordonSmith committed Feb 12, 2024
2 parents ca902ba + c3c13f1 commit 619a616
Show file tree
Hide file tree
Showing 29 changed files with 2,100 additions and 853 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
mount_build: ${{ steps.vars.outputs.mount_build }}
community_ref: ${{ steps.vars.outputs.community_ref }}
internal_ref: ${{ steps.vars.outputs.internal_ref }}
eclide_ref: ${{ steps.vars.outputs.eclide_ref }}
community_tag: ${{ steps.vars.outputs.community_tag }}
internal_tag: ${{ steps.vars.outputs.internal_tag }}
hpcc_version: ${{ steps.vars.outputs.hpcc_version }}
Expand All @@ -52,6 +53,7 @@ jobs:
community_ref=${{ github.ref }}
echo "community_ref=$community_ref" >> $GITHUB_OUTPUT
echo "internal_ref=$(echo $community_ref | sed 's/community/internal/')" >> $GITHUB_OUTPUT
echo "eclide_ref=$(echo $community_ref | sed 's/community/eclide/')" >> $GITHUB_OUTPUT
community_tag=$(echo $community_ref | cut -d'/' -f3)
echo "community_tag=$community_tag" >> $GITHUB_OUTPUT
echo "internal_tag=$(echo $community_tag | sed 's/community/internal/')" >> $GITHUB_OUTPUT
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-test-eclwatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
build:
strategy:
matrix:
node: ["18", "16"]
node: ["20", "18", "16"]
fail-fast: false
name: "Check eclwatch and npm"
needs: pre_job
Expand Down
11 changes: 9 additions & 2 deletions dali/dfu/dfuutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -421,8 +421,15 @@ class CFileCloner
// JCSMORE: it may be this can replace the need for the other 'clone*' attributes altogether.
if (srcfdesc->queryProperties().hasProp("_remoteStoragePlane"))
{
attrs.setPropTree("cloneFromFDesc", createPTreeFromIPT(srcTree));
return;
if (srcdali && !srcdali->endpoint().isNull())
{
attrs.setPropTree("cloneFromFDesc", createPTreeFromIPT(srcTree));
StringBuffer host;
attrs.setProp("@cloneFrom", srcdali->endpoint().getEndpointHostText(host).str());
if (prefix.length())
attrs.setProp("@cloneFromPrefix", prefix.get());
return;
}
}

while(attrs.removeProp("cloneFromGroup"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,5 @@ B:= STD.Str.Contains(
'abcdefghijklmnopqrstuvwxyz', false); //returns FALSE -- 'z' is missing
</programlisting>

<para></para>
<para>See Also: <link linkend="Find">Find</link></para>
</sect1>
2 changes: 2 additions & 0 deletions docs/EN_US/ECLStandardLibraryReference/SLR-Mods/Find.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,6 @@ D := IF(STD.Str.Find('', 'BD', 1) = 0,
'Success',
'Failure - 4'); //success
</programlisting>

<para>See Also: <link linkend="Contains">Contains</link></para>
</sect1>
26 changes: 16 additions & 10 deletions esp/platform/espp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,21 @@ void initializeMetrics(CEspConfig* config)
}
}

static void copyTree(IPropertyTree * to, const IPropertyTree * from, const char * xpath)
{
IPropertyTree * match = from->queryPropTree(xpath);
if (match)
to->setPropTree(xpath, LINK(match));
}

static IPropertyTree * extractLegacyOptions(IPropertyTree * legacyOptions)
{
IPropertyTree * legacyProcessConfig = legacyOptions->queryPropTree("Software/EspProcess[1]");
Owned<IPropertyTree> extractedOptions = createPTree();
copyTree(extractedOptions, legacyProcessConfig, "tracing");
return extractedOptions.getClear();
}

int init_main(int argc, const char* argv[])
{
if (!checkCreateDaemon(argc, argv))
Expand Down Expand Up @@ -454,16 +469,7 @@ int init_main(int argc, const char* argv[])
envpt.setown(createPTreeFromXMLFile(cfgfile, ipt_caseInsensitive));

// NB: esp has no standard component config in bare-metal, this is loading defaultYaml only
espConfig.setown(loadConfiguration(defaultYaml, argv, "esp", "ESP", nullptr, nullptr));

// legacy esp.xml will contain a generated global section if present in the environment.
// replace the empty stub created by loadConfiguration with this environment globals section.
Owned<IPropertyTree> global = envpt->getPropTree("global");
if (global)
{
Owned<IPropertyTree> currentConfig = getComponentConfig();
replaceComponentConfig(currentConfig, global);
}
espConfig.setown(loadConfiguration(defaultYaml, argv, "esp", "ESP", cfgfile, extractLegacyOptions));
}
Owned<IPropertyTree> procpt = NULL;
if (envpt)
Expand Down
21 changes: 18 additions & 3 deletions esp/services/ws_store/espstorelib/daliKVStore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,28 @@ bool CDALIKVStore::createStore(const char * apptype, const char * storename, con

ensureAttachedToDali(); //throws if in offline mode

Owned<IRemoteConnection> conn = querySDS().connect(DALI_KVSTORE_PATH, myProcessSession(), RTM_LOCK_WRITE, SDS_LOCK_TIMEOUT_KVSTORE);
Owned<IRemoteConnection> conn = querySDS().connect(DALI_KVSTORE_PATH, myProcessSession(), RTM_LOCK_READ, SDS_LOCK_TIMEOUT_KVSTORE);
if (!conn)
throw MakeStringException(-1, "Unable to connect to DALI KeyValue store root: '%s'", DALI_KVSTORE_PATH);

Owned<IPropertyTree> root = conn->getRoot();
VStringBuffer xpath("Store[%s='%s'][1]", DALI_KVSTORE_NAME_ATT, storename);
{
Owned<IPropertyTree> root = conn->getRoot();
if (root->hasProp(xpath.str()))
{
LOG(MCuserInfo,"DALI Keystore createStore(): '%s' entry already exists", storename);
return false;
}
}

//target store does not exist, let's create it
//re-establish connection with write lock
conn.clear();
conn.setown(querySDS().connect(DALI_KVSTORE_PATH, myProcessSession(), RTM_LOCK_WRITE, SDS_LOCK_TIMEOUT_KVSTORE));

VStringBuffer xpath("Store[%s='%s'][1]", DALI_KVSTORE_NAME_ATT, storename);
Owned<IPropertyTree> root = conn->getRoot();
//was the target store created while we were waiting for the lock?
//if so, we don't need to create it again
if (root->hasProp(xpath.str()))
{
LOG(MCuserInfo,"DALI Keystore createStore(): '%s' entry already exists", storename);
Expand Down
Loading

0 comments on commit 619a616

Please sign in to comment.