Browse Source

Merge pull request #5811 from richardkchapman/compulsory-query-hash

HPCC-11287 Avoid including files in query hash if package resolves everything

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>
Gavin Halliday 11 năm trước cách đây
mục cha
commit
7c589d2588
3 tập tin đã thay đổi với 6 bổ sung1 xóa
  1. 1 0
      common/workunit/package.h
  2. 1 1
      roxie/ccd/ccdquery.cpp
  3. 4 0
      roxie/ccd/ccdstate.cpp

+ 1 - 0
common/workunit/package.h

@@ -38,6 +38,7 @@ interface IHpccPackage : extends IInterface
 
     virtual const char *queryEnv(const char *varname) const = 0;
     virtual bool getEnableFieldTranslation() const = 0;
+    virtual bool isCompulsory() const = 0;
     virtual const IPropertyTree *queryTree() const = 0;
     virtual hash64_t queryHash() const = 0;
     virtual const char *queryId() const = 0;

+ 1 - 1
roxie/ccd/ccdquery.cpp

@@ -904,7 +904,7 @@ public:
         if (dll)
         {
             hashValue = rtlHash64VStr(dll->queryDll()->queryName(), hashValue);
-            if (!allFilesDynamic && !isDynamic)
+            if (!allFilesDynamic && !isDynamic && !package.isCompulsory())
             {
                 IConstWorkUnit *wu = dll->queryWorkUnit();
                 if (wu) // wu may be null in some unit test cases

+ 4 - 0
roxie/ccd/ccdstate.cpp

@@ -682,6 +682,10 @@ public:
     {
         return CPackageNode::getEnableFieldTranslation();
     }
+    virtual bool isCompulsory() const
+    {
+        return CPackageNode::isCompulsory();
+    }
     virtual const IPropertyTree *queryTree() const
     {
         return CPackageNode::queryTree();