incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [5/8] git commit: Fixed a large bug with old segments not being released.
Date Wed, 28 Aug 2013 18:16:51 GMT
Fixed a large bug with old segments not being released.


Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/00a29ab9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/00a29ab9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/00a29ab9

Branch: refs/heads/master
Commit: 00a29ab98cf0594c55abd4ae478c155aecb80610
Parents: 21359cb
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Wed Aug 28 14:09:11 2013 -0400
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Wed Aug 28 14:09:11 2013 -0400

----------------------------------------------------------------------
 .../store/refcounter/DirectoryReferenceCounter.java      | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/00a29ab9/blur-store/src/main/java/org/apache/blur/lucene/store/refcounter/DirectoryReferenceCounter.java
----------------------------------------------------------------------
diff --git a/blur-store/src/main/java/org/apache/blur/lucene/store/refcounter/DirectoryReferenceCounter.java
b/blur-store/src/main/java/org/apache/blur/lucene/store/refcounter/DirectoryReferenceCounter.java
index 250cc69..435ee36 100644
--- a/blur-store/src/main/java/org/apache/blur/lucene/store/refcounter/DirectoryReferenceCounter.java
+++ b/blur-store/src/main/java/org/apache/blur/lucene/store/refcounter/DirectoryReferenceCounter.java
@@ -36,10 +36,10 @@ import org.apache.lucene.store.LockFactory;
 public class DirectoryReferenceCounter extends Directory implements DirectoryDecorator {
 
   private final static Log LOG = LogFactory.getLog(DirectoryReferenceCounter.class);
-  private Directory directory;
-  private Map<String, AtomicInteger> refCounters = new ConcurrentHashMap<String,
AtomicInteger>();
-  private DirectoryReferenceFileGC gc;
-  private IndexInputCloser closer;
+  private final Directory directory;
+  private final Map<String, AtomicInteger> refCounters = new ConcurrentHashMap<String,
AtomicInteger>();
+  private final DirectoryReferenceFileGC gc;
+  private final IndexInputCloser closer;
 
   public DirectoryReferenceCounter(Directory directory, DirectoryReferenceFileGC gc, IndexInputCloser
closer) {
     this.directory = directory;
@@ -57,8 +57,9 @@ public class DirectoryReferenceCounter extends Directory implements DirectoryDec
   }
 
   public void deleteFile(String name) throws IOException {
+    LOG.debug("deleteFile [{0}] being called", name);
     if (name.equals(IndexFileNames.SEGMENTS_GEN)) {
-      deleteFile(name);
+      directory.deleteFile(name);
       return;
     }
     AtomicInteger counter = refCounters.get(name);


Mime
View raw message