浏览代码

HPCC-8002 Fix a couple of issues pick up by msvc

Most significantly, dedupSuccessess was always being incremented.
Meaning, it would continue to try and dedup in hash distributor
even if not succeeding to reduce

Signed-off-by: Jake Smith <jake.smith@lexisnexis.com>
Jake Smith 12 年之前
父节点
当前提交
4b45750265
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      thorlcr/activities/hashdistrib/thhashdistribslave.cpp

+ 3 - 3
thorlcr/activities/hashdistrib/thhashdistribslave.cpp

@@ -332,7 +332,7 @@ class CDistributorBase : public CSimpleInterface, implements IHashDistributor, i
                 SpinBlock b(doDedupLock);
                 SpinBlock b(doDedupLock);
                 if (dedupSamples<10)
                 if (dedupSamples<10)
                 {
                 {
-                    if (postCount<preCount*9/10);
+                    if (postCount<preCount*9/10)
                         dedupSuccesses++;
                         dedupSuccesses++;
                     dedupSamples++;
                     dedupSamples++;
                     ActPrintLog(owner.activity, "pre-dedup sample %d : %d unique out of %d, took: %d ms", dedupSamples, postCount, preCount, tookMs);
                     ActPrintLog(owner.activity, "pre-dedup sample %d : %d unique out of %d, took: %d ms", dedupSamples, postCount, preCount, tookMs);
@@ -742,11 +742,11 @@ public:
         fixedEstSize = meta->querySerializedMeta()->getFixedSize();
         fixedEstSize = meta->querySerializedMeta()->getFixedSize();
         rowManager = activity->queryJob().queryRowManager();
         rowManager = activity->queryJob().queryRowManager();
 
 
-        unsigned defaultAllowSpill = activity->queryJob().getWorkUnitValueBool("allowSpillHashDist", globals->getPropBool("@allowSpillHashDist", true));
+        bool defaultAllowSpill = activity->queryJob().getWorkUnitValueBool("allowSpillHashDist", globals->getPropBool("@allowSpillHashDist", true));
         allowSpill = activity->queryContainer().queryXGMML().getPropBool("hint[@name=\"allow_spill\"]/@value", defaultAllowSpill);
         allowSpill = activity->queryContainer().queryXGMML().getPropBool("hint[@name=\"allow_spill\"]/@value", defaultAllowSpill);
         if (allowSpill)
         if (allowSpill)
             ActPrintLog(activity, "Using spilling buffer (will spill if overflows)");
             ActPrintLog(activity, "Using spilling buffer (will spill if overflows)");
-        writerPoolSize = activity->queryJob().getWorkUnitValueInt("hashDistWritePoolSize", globals->getPropInt("@hashDistWritePoolSize", DEFAULT_WRITEPOOLSIZE));
+        writerPoolSize = (unsigned)activity->queryJob().getWorkUnitValueInt("hashDistWritePoolSize", globals->getPropInt("@hashDistWritePoolSize", DEFAULT_WRITEPOOLSIZE));
         if (writerPoolSize>numnodes)
         if (writerPoolSize>numnodes)
             writerPoolSize = numnodes; // no point in more
             writerPoolSize = numnodes; // no point in more
         ActPrintLog(activity, "Writer thread pool size : %d", writerPoolSize);
         ActPrintLog(activity, "Writer thread pool size : %d", writerPoolSize);