Explorar o código

HPCC-10686 - Need to check subfile after lock retry

Need to check if subfile provided in RemoveSubFile when
rechcking if sub is member of super after dirty lock.
subfile is empty in case of ClearSuperFile(calling RemoveSubFile)

Signed-off-by: Jake Smith <jake.smith@lexisnexis.com>
Jake Smith %!s(int64=11) %!d(string=hai) anos
pai
achega
40a0dc4213
Modificáronse 1 ficheiros con 5 adicións e 2 borrados
  1. 5 2
      dali/base/dadfs.cpp

+ 5 - 2
dali/base/dadfs.cpp

@@ -4473,8 +4473,11 @@ class CDistributedSuperFile: public CDistributedFileBase<IDistributedSuperFile>
                     {
                         sf->loadSubFiles(transaction, SDS_TRANSACTION_RETRY);
                         // potentially subfile _was_ a subfile, but isn't anymore, after dirty update
-                        if (!transaction->isSubFile(parent, subfile, true))
-                            WARNLOG("addSubFile: File %s is not a subfile of %s", subfile.get(), parent->queryLogicalName());
+                        if (!subfile.isEmpty())
+                        {
+                            if (!transaction->isSubFile(parent, subfile, true))
+                                WARNLOG("addSubFile: File %s is not a subfile of %s", subfile.get(), parent->queryLogicalName());
+                        }
                     }
                 }
                 if (sub)