Explorar o código

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 %!s(int64=10) %!d(string=hai) anos
pai
achega
c3473ed19c
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  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);