Skip to content

Commit

Permalink
HPCC-30606 Changes following review
Browse files Browse the repository at this point in the history
Signed-off-by: Shamser Ahmed <[email protected]>
  • Loading branch information
shamser committed Oct 31, 2023
1 parent edcce6d commit 96c00b8
Showing 1 changed file with 20 additions and 21 deletions.
41 changes: 20 additions & 21 deletions common/wuanalysis/anarule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,34 +144,33 @@ class IoSkewRule : public AActivityRule
}
else
{
bool fileSkew = false;
bool sizeSkew = false;
bool numRowsSkew = false;
IWuEdge *wuEdge = nullptr;
if (stat == StTimeDiskWriteIO)
{
IWuEdge *inputEdge;
unsigned i=0;
while (!fileSkew && (inputEdge=activity.queryInput(i++)))
{
//output IO is likely to be skewed because # rows written by the workers are skewed
if (inputEdge->getStatRaw(StNumRowsProcessed, StSkewMax)>options.queryOption(watOptSkewThreshold))
fileSkew = true;
}
if (activity.getStatRaw(StSizeDiskWrite)>options.queryOption(watOptSkewThreshold))
sizeSkew = true;
IWuEdge *wuEdge = activity.queryInput(0);
}
if (stat == StTimeDiskReadIO)
else if (stat == StTimeDiskReadIO)
{
IWuEdge *outputEdge;
unsigned i=0;
while (!fileSkew && (outputEdge=activity.queryOutput(i++)))
{
//input IO is likely to be skewed because # rows read by the workers are skewed
if (outputEdge->getStatRaw(StNumRowsProcessed, StSkewMax)>options.queryOption(watOptSkewThreshold))
fileSkew = true;
}
if (activity.getStatRaw(StSizeDiskRead)>options.queryOption(watOptSkewThreshold))
sizeSkew = true;
IWuEdge *wuEdge = activity.queryOutput(0);
}
if (wuEdge && wuEdge->getStatRaw(StNumRowsProcessed, StSkewMax)>options.queryOption(watOptSkewThreshold))
numRowsSkew = true;
cost = (timeMaxLocalExecute - timeAvgLocalExecute);
if (fileSkew)
result.set(ANA_IOSKEW_RECORDS_ID, cost, "Significant skew in datafile partitioning is causing uneven %s time", category);
if (sizeSkew)
{
if (numRowsSkew)
result.set(ANA_IOSKEW_RECORDS_ID, cost, "Significant skew in number of records is causing uneven %s time", category);
else
result.set(ANA_IOSKEW_RECORDS_ID, cost, "Significant skew in record sizes is causing uneven %s time", category);
}
else
result.set(ANA_IOSKEW_RECORDS_ID, cost, "Significant skew in IO performance may be causing uneven %s time", category);
result.set(ANA_IOSKEW_RECORDS_ID, cost, "Significant skew in IO performance is causing uneven %s time", category);
}
updateInformation(result, activity);
return true;
Expand Down

0 comments on commit 96c00b8

Please sign in to comment.