Skip to content

Commit

Permalink
HPCC-31715 Change the default field translation mode
Browse files Browse the repository at this point in the history
  • Loading branch information
jackdelv committed May 23, 2024
1 parent b7c9bd6 commit 3b87b55
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion helm/hpcc/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1865,7 +1865,7 @@
"description": "Should the index node memory allocation flush the cache and retry if memory allocation fails"
},
"fieldTranslationEnabled": {
"default": "payload",
"default": "payloadRemoveOnly",
"enum": ["false", "true", "payload", "payloadRemoveOnly"],
"description": "Enables translation (where possible) of mismatched file layouts on-the-fly. Specify 'payload' to attempt to translate payload fields only"
},
Expand Down
2 changes: 1 addition & 1 deletion initfiles/componentfiles/configschema/xsd/eclagent.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
hpcc:presetValue="false"
hpcc:tooltip="eclAgent analyzes workunit post-execution"/>
<xs:attribute name="fieldTranslationEnabled" hpcc:displayName="Enable Field Translation"
hpcc:presetValue="payload"
hpcc:presetValue="payloadRemoveOnly"
hpcc:tooltip="Enables translation (where possible) of mismatched index layouts on-the-fly. Specify 'payload' to attempt to translate payload fields only">
<xs:simpleType>
<xs:restriction base="xs:string">
Expand Down
2 changes: 1 addition & 1 deletion initfiles/componentfiles/configschema/xsd/roxie.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
hpcc:displayName="flushJHtreeCacheOnOOM" hpcc:presetValue="true"
hpcc:tooltip="Should the index node memory allocation flush the cache and retry if memory allocation fails"/>
<xs:attribute name="fieldTranslationEnabled" hpcc:displayName="Enable Field Translation"
hpcc:presetValue="payload"
hpcc:presetValue="payloadRemoveOnly"
hpcc:tooltip="Enables translation (where possible) of mismatched index layouts on-the-fly. Specify 'payload' to attempt to translate payload fields only">
<xs:simpleType>
<xs:restriction base="xs:string">
Expand Down
2 changes: 1 addition & 1 deletion initfiles/componentfiles/configschema/xsd/thor.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@
<xs:attribute name="httpGlobalIdHeader" type="xs:string" hpcc:displayName="HTTP GlobalId Header" hpcc:presetValue="HPCC-Global-Id"
hpcc:tooltip="HTTP Header field to use for sending and receiving GlobalId"/>
<xs:attribute name="fieldTranslationEnabled" hpcc:displayName="Enable Field Translation"
hpcc:presetValue="payload"
hpcc:presetValue="payloadRemoveOnly"
hpcc:tooltip="Enables translation (where possible) of mismatched index layouts on-the-fly. Specify 'payload' to attempt to translate payload fields only">
<xs:simpleType>
<xs:restriction base="xs:string">
Expand Down
2 changes: 1 addition & 1 deletion initfiles/componentfiles/configxml/eclagent_config.xsd.in
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
</xs:annotation>
</xs:attribute>

<xs:attribute name="fieldTranslationEnabled" use="optional" default="payload">
<xs:attribute name="fieldTranslationEnabled" use="optional" default="payloadRemoveOnly">
<xs:annotation>
<xs:appinfo>
<tooltip>Enables translation (where possible) of mismatched file layouts on-the-fly. Specify 'payload' to attempt to translate payload fields only</tooltip>
Expand Down
2 changes: 1 addition & 1 deletion initfiles/componentfiles/configxml/roxie.xsd.in
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@
</xs:appinfo>
</xs:annotation>
</xs:attribute>
<xs:attribute name="fieldTranslationEnabled" use="optional" default="payload">
<xs:attribute name="fieldTranslationEnabled" use="optional" default="payloadRemoveOnly">
<xs:annotation>
<xs:appinfo>
<tooltip>Enables translation (where possible) of mismatched file layouts on-the-fly. Specify 'payload' to attempt to translate payload fields only</tooltip>
Expand Down
2 changes: 1 addition & 1 deletion initfiles/componentfiles/configxml/thor.xsd.in
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@
</xs:appinfo>
</xs:annotation>
</xs:attribute>
<xs:attribute name="fieldTranslationEnabled" use="optional" default="payload">
<xs:attribute name="fieldTranslationEnabled" use="optional" default="payloadRemoveOnly">
<xs:annotation>
<xs:appinfo>
<tooltip>Enables translation (where possible) of mismatched file layouts on-the-fly. Specify 'payload' to attempt to translate payload fields only</tooltip>
Expand Down
2 changes: 1 addition & 1 deletion initfiles/etc/DIR_NAME/environment.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
enableKeyDiff="true"
enableSysLog="true"
fastLaneQueue="true"
fieldTranslationEnabled="payload"
fieldTranslationEnabled="payloadRemoveOnly"
flushJHtreeCacheOnOOM="true"
forceStdLog="false"
heapRetainMemory="false"
Expand Down
4 changes: 2 additions & 2 deletions roxie/ccd/ccdmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ unsigned defaultTraceLimit = 10;
unsigned watchActivityId = 0;
unsigned testAgentFailure = 0;
RelaxedAtomic<unsigned> restarts;
RecordTranslationMode fieldTranslationEnabled = RecordTranslationMode::Payload;
RecordTranslationMode fieldTranslationEnabled = RecordTranslationMode::PayloadRemoveOnly;
bool mergeAgentStatistics = true;
PTreeReaderOptions defaultXmlReadFlags = ptr_ignoreWhiteSpace;
bool runOnce = false;
Expand Down Expand Up @@ -1183,7 +1183,7 @@ int CCD_API roxie_main(int argc, const char *argv[], const char * defaultYaml)
agentQueryReleaseDelaySeconds = topology->getPropInt("@agentQueryReleaseDelaySeconds", topology->getPropInt("@slaveQueryReleaseDelaySeconds", 60)); // legacy name
coresPerQuery = topology->getPropInt("@coresPerQuery", 0);

fieldTranslationEnabled = RecordTranslationMode::Payload;
fieldTranslationEnabled = RecordTranslationMode::PayloadRemoveOnly;
const char *val = topology->queryProp("@fieldTranslationEnabled");
if (val)
fieldTranslationEnabled = getTranslationMode(val, false);
Expand Down
2 changes: 1 addition & 1 deletion roxie/ccd/ccdstate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2463,7 +2463,7 @@ class CRoxiePackageSetManager : implements IRoxieQueryPackageManagerSet, impleme
if (val)
fieldTranslationEnabled = getTranslationMode(val, false);
else
fieldTranslationEnabled = RecordTranslationMode::Payload;
fieldTranslationEnabled = RecordTranslationMode::PayloadRemoveOnly;
val = getTranslationModeText(fieldTranslationEnabled);
topology->setProp("@fieldTranslationEnabled", val);
}
Expand Down
6 changes: 3 additions & 3 deletions rtl/eclrtl/rtldynfield.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@

extern ECLRTL_API RecordTranslationMode getTranslationMode(const char *val, bool isLocal)
{
if (isEmptyString(val) || strToBool(val) || strieq(val, "payload"))
return RecordTranslationMode::Payload;
else if (strieq(val, "payloadRemoveOnly"))
if (isEmptyString(val) || strToBool(val) || strieq(val, "payloadRemoveOnly"))
return RecordTranslationMode::PayloadRemoveOnly;
else if (strieq(val, "payload"))
return RecordTranslationMode::Payload;
else if (strieq(val, "alwaysDisk") || strieq(val, "disk"))
{
if (!isLocal)
Expand Down
2 changes: 1 addition & 1 deletion testing/regress/environment.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
enableKeyDiff="true"
enableSysLog="true"
fastLaneQueue="true"
fieldTranslationEnabled="payload"
fieldTranslationEnabled="payloadRemoveOnly"
flushJHtreeCacheOnOOM="true"
forceStdLog="false"
heapRetainMemory="false"
Expand Down

0 comments on commit 3b87b55

Please sign in to comment.