Skip to content

Commit

Permalink
HPCC-30285 remove multi-plane consistency check
Browse files Browse the repository at this point in the history
Signed-off-by: Jake Smith <[email protected]>
  • Loading branch information
jakesmith committed Sep 22, 2023
1 parent f3f4b53 commit a107825
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 25 deletions.
13 changes: 3 additions & 10 deletions ecl/hthor/hthor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,6 @@ ClusterWriteHandler *createClusterWriteHandler(IAgentContext &agent, IHThorIndex
getDefaultStoragePlane(defaultCluster);
Owned<CHThorClusterWriteHandler> clusterHandler;
unsigned clusterIdx = 0;
bool outputPlaneCompressed = false;

while(true)
{
Expand All @@ -382,14 +381,6 @@ ClusterWriteHandler *createClusterWriteHandler(IAgentContext &agent, IHThorIndex
clusterHandler.setown(new CHThorClusterWriteHandler(lfn, "OUTPUT", agent));
}
clusterHandler->addCluster(cluster);

// This is checking that all output planes agree on compression being used or not
Owned<IPropertyTree> plane = getStoragePlane(cluster);
bool thisPlaneCompressed = plane ? plane->getPropBool("@compressLogicalFiles") : false;
if (1 == clusterIdx)
outputPlaneCompressed = thisPlaneCompressed;
else if (outputPlaneCompressed != thisPlaneCompressed)
throw makeStringExceptionV(ENGINEERR_MIXED_COMPRESSED_WRITE, "Writing to planes with mixed compression is not supported %s", lfn);
}
if(clusterHandler)
{
Expand Down Expand Up @@ -561,8 +552,10 @@ void CHThorDiskWriteActivity::resolve()
else
getDefaultStoragePlane(planeName);
bool outputCompressionDefault = agent.queryWorkUnit()->getDebugValueBool("compressAllOutputs", isContainerized());
outputPlaneCompressed = outputCompressionDefault;
Owned<IPropertyTree> plane = getStoragePlane(planeName);
outputPlaneCompressed = plane ? plane->getPropBool("@compressLogicalFiles", outputCompressionDefault) : outputCompressionDefault;
if (plane)
outputPlaneCompressed = plane->getPropBool("@compressLogicalFiles", outputCompressionDefault);
}
}
else
Expand Down
15 changes: 8 additions & 7 deletions roxie/ccd/ccdserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11970,13 +11970,13 @@ class CRoxieServerDiskWriteActivity : public CRoxieServerInternalSinkActivity, i
clusters.append(cluster);
clusterIdx++;

// This is checking that all output planes agree on compression being used or not
Owned<IPropertyTree> plane = getStoragePlane(cluster);
bool thisPlaneCompressed = plane ? plane->getPropBool("@compressLogicalFiles", outputCompressionDefault) : outputCompressionDefault;
if (1 == clusterIdx)
outputPlaneCompressed = thisPlaneCompressed;
else if (outputPlaneCompressed != thisPlaneCompressed)
throw makeStringExceptionV(ENGINEERR_MIXED_COMPRESSED_WRITE, "Writing to planes with mixed compression is not supported %s", rawLogicalName.get());
{
// establish default compression from 1st plane, but ECL compression attributes take precedence
Owned<IPropertyTree> plane = getStoragePlane(cluster);
if (plane)
outputPlaneCompressed = plane->getPropBool("@compressLogicalFiles", outputCompressionDefault);
}
}
if (clusters.length())
{
Expand All @@ -11990,7 +11990,8 @@ class CRoxieServerDiskWriteActivity : public CRoxieServerInternalSinkActivity, i
{
clusters.append(defaultCluster);
Owned<IPropertyTree> plane = getStoragePlane(defaultCluster);
outputPlaneCompressed = plane ? plane->getPropBool("@compressLogicalFiles", outputCompressionDefault) : outputCompressionDefault;
if (plane)
outputPlaneCompressed = plane->getPropBool("@compressLogicalFiles", outputCompressionDefault);
}
else if (roxieName.length())
clusters.append(roxieName.str());
Expand Down
17 changes: 9 additions & 8 deletions thorlcr/activities/thdiskbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ void CWriteMasterBase::init()
}
if (dlfn.isExternal())
mpTag = container.queryJob().allocateMPTag(); // used
bool outputPlaneCompressed = false;
bool outputCompressionDefault = getOptBool(THOROPT_COMPRESS_ALLFILES, isContainerized());
bool outputPlaneCompressed = outputCompressionDefault;
if (NULL == fileDesc.get())
{
bool overwriteok = 0!=(TDWoverwrite & diskHelperBase->getFlags());
Expand All @@ -178,13 +178,13 @@ void CWriteMasterBase::init()
clusters.append(cluster);
idx++;

// This is checking that all output planes agree on compression being used or not
Owned<IPropertyTree> plane = getStoragePlane(cluster);
bool thisPlaneCompressed = plane ? plane->getPropBool("@compressLogicalFiles", outputCompressionDefault) : outputCompressionDefault;
if (1 == idx)
outputPlaneCompressed = thisPlaneCompressed;
else if (outputPlaneCompressed != thisPlaneCompressed)
throw makeStringExceptionV(ENGINEERR_MIXED_COMPRESSED_WRITE, "Writing to planes with mixed compression is not supported %s", fileName.get());
{
// establish default compression from 1st plane, but ECL compression attributes take precedence
Owned<IPropertyTree> plane = getStoragePlane(cluster);
if (plane)
outputPlaneCompressed = plane->getPropBool("@compressLogicalFiles", outputCompressionDefault);
}
}

IArrayOf<IGroup> groups;
Expand All @@ -209,7 +209,8 @@ void CWriteMasterBase::init()
{
clusters.append(defaultCluster);
Owned<IPropertyTree> plane = getStoragePlane(defaultCluster);
outputPlaneCompressed = plane ? plane->getPropBool("@compressLogicalFiles", outputCompressionDefault) : outputCompressionDefault;
if (plane)
outputPlaneCompressed = plane->getPropBool("@compressLogicalFiles", outputCompressionDefault);
}
}
}
Expand Down

0 comments on commit a107825

Please sign in to comment.