Parcourir la source

Merge pull request #2167 from rengolin/dfs-daregress

Revert superfile regression, hint what to do to fix later

Reviewed-By: Jake Smith <jake.smith@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman il y a 13 ans
Parent
commit
d7a9b81b9a
2 fichiers modifiés avec 9 ajouts et 6 suppressions
  1. 1 1
      dali/base/dadfs.cpp
  2. 8 5
      dali/regress/daregress.cpp

+ 1 - 1
dali/base/dadfs.cpp

@@ -6641,7 +6641,7 @@ IDistributedSuperFile *CDistributedFileDirectory::createSuperFile(const char *_l
     localtrans->autoCommit();
 
     // Should have been persisted to the DFS by now
-    return localtrans->lookupSuperFile(logicalname.get());
+    return lookupSuperFile(logicalname.get(), user, localtrans, false, defaultTimeout);
 }
 
 // MORE - this should go when remove file gets into transactions

+ 8 - 5
dali/regress/daregress.cpp

@@ -614,20 +614,23 @@ static void testDFSTrans()
 
     // Rollback
     printf("Rollback test (active transaction)\n");
-    transaction->start();
+    // TODO: move createSuperFile inside transaction (return it from the transaction, not dir)
     Owned<IDistributedSuperFile> sfile2 = dir.createSuperFile("regress::trans::super2", false, false, NULL, transaction);
+    transaction->start();
     sfile2->addSubFile("regress::trans::sub3", false, NULL, false, transaction);
     sfile2->addSubFile("regress::trans::sub4", false, NULL, false, transaction);
     transaction->rollback();
     if (sfile2->numSubFiles() != 0)
         ERROR("transactional rollback failed, some subs were added");
     sfile2.clear();
-    sfile2.setown(dir.lookupSuperFile("regress::trans::super2", NULL, transaction));
-    if (sfile2.get())
-        ERROR("transactional rollback super2 failed, it exists!");
+    // TODO: move createSuperFile inside transaction (return it from the transaction, not dir)
+//    sfile2.setown(dir.lookupSuperFile("regress::trans::super2", NULL, transaction));
+//    if (sfile2.get())
+//        ERROR("transactional rollback super2 failed, it exists!");
 
-    // Commit - FIXME - adding the superfile inside the transaction exposed a flaw in the DFS that only happens in this case
+    // Commit
     printf("Commit test (active transaction)\n");
+    // TODO: move createSuperFile inside transaction (return it from the transaction, not dir)
     Owned<IDistributedSuperFile> sfile3 = dir.createSuperFile("regress::trans::super3", false, false, NULL, transaction);
     transaction->start();
     sfile3->addSubFile("regress::trans::sub3", false, NULL, false, transaction);