Browse Source

Merge remote-tracking branch 'origin/candidate-3.10.x' into candidate-4.0.0

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 12 years ago
parent
commit
415bd264ab
1 changed files with 6 additions and 4 deletions
  1. 6 4
      roxie/ccd/ccdfile.cpp

+ 6 - 4
roxie/ccd/ccdfile.cpp

@@ -1320,22 +1320,24 @@ public:
         ForEach(h)
         {
             ILazyFileIO *f = files.mapToValue(&h.query());
-            const char *fname = remote ? f->querySource()->queryFilename() : f->queryFilename();
             if (f->isAlive() && f->isOpen() && f->isRemote()==remote && !f->isCopying())
             {
                 unsigned age = msTick() - f->getLastAccessed();
                 if (age > maxFileAge[remote])
                 {
                     if (traceLevel > 5)
+                    {
+                        // NOTE - querySource will cause the file to be opened if not already open
+                        // That's OK here, since we know the file is open and remote.
+                        // But don't be tempted to move this line outside these if's (eg. to trace the idle case)
+                        const char *fname = remote ? f->querySource()->queryFilename() : f->queryFilename();
                         DBGLOG("Closing inactive %s file %s (last accessed %u ms ago)", remote ? "remote" : "local",  fname, age);
+                    }
                     f->close();
                 }
                 else
                     goers.append(*f);
             }
-            else if (traceLevel > 8)
-                DBGLOG("Ignoring idle %s file %s", remote ? "remote" : "local",  fname);
-
         }
         unsigned numFilesLeft = goers.ordinality(); 
         if (numFilesLeft > maxFilesOpen[remote])