Browse Source

HPCC-14572 Fixes following code review

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Gavin Halliday 9 years ago
parent
commit
c12de3516c
2 changed files with 5 additions and 1 deletions
  1. 1 0
      common/remote/hooks/git/gitfile.cpp
  2. 4 1
      roxie/ccd/ccdfile.cpp

+ 1 - 0
common/remote/hooks/git/gitfile.cpp

@@ -141,6 +141,7 @@ public:
     }
     unsigned __int64 getStatistic(StatisticKind kind)
     {
+        //This could be implemented, but not likely to be useful so currently return nothing.
         return 0;
     }
 protected:

+ 4 - 1
roxie/ccd/ccdfile.cpp

@@ -188,7 +188,10 @@ public:
         try
         {
             if (current.get()!=&failure)
+            {
                 atomic_dec(&numFilesOpen[remote]);
+                mergeStats(fileStats, current);
+            }
             current.set(&failure); 
         }
         catch (IException *E) 
@@ -374,7 +377,7 @@ public:
         }
 
         CriticalBlock b(crit);
-        unsigned __int64 openValue = current ? current->getStatistic(kind) : 0;
+        unsigned __int64 openValue = current->getStatistic(kind);
         return openValue + fileStats.getStatisticValue(kind);
     }