Browse Source

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

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 12 years ago
parent
commit
f835a3fcf3
2 changed files with 7 additions and 4 deletions
  1. 6 4
      roxie/ccd/ccdfile.cpp
  2. 1 0
      roxie/ccd/ccdserver.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])

+ 1 - 0
roxie/ccd/ccdserver.cpp

@@ -23680,6 +23680,7 @@ public:
         activityKind = _factory->getKind();
         indexReadInput = NULL;
         rootIndex = NULL;
+        atmostsTriggered = 0;
         // MORE - code would be easier to read if I got more values from helper rather than passing from factory
     }