Преглед изворни кода

Merge pull request #7590 from jakesmith/hpcc-13686

HPCC-13686 Avoid unecessary locking if subfile missing on remove

Reviewed-By: Attila Vamos <attila.vamos@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman пре 10 година
родитељ
комит
c3473ed19c
1 измењених фајлова са 5 додато и 0 уклоњено
  1. 5 0
      dali/base/dadfs.cpp

+ 5 - 0
dali/base/dadfs.cpp

@@ -4637,7 +4637,12 @@ class CDistributedSuperFile: public CDistributedFileBase<IDistributedSuperFile>
                     return false;
                 }
                 if (!transaction->isSubFile(parent, subfile, true))
+                {
                     WARNLOG("removeSubFile: File %s is not a subfile of %s", subfile.get(), parent->queryLogicalName());
+                    parent.clear();
+                    sub.clear();
+                    return true; // NB: sub was not a member of super, issue warning and continue without locking
+                }
             }
             // Try to lock all files
             addFileLock(parent);