incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject git commit: Forgot to add these changes for unit fixes.
Date Mon, 04 Mar 2013 03:34:16 GMT
Updated Branches:
  refs/heads/0.2-dev 6a667cbc8 -> 1a0b35ff1


Forgot to add these changes for unit fixes.


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

Branch: refs/heads/0.2-dev
Commit: 1a0b35ff1f04045e274d854c92a2c8d2e01a9fe1
Parents: 6a667cb
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Sun Mar 3 22:33:46 2013 -0500
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Sun Mar 3 22:33:46 2013 -0500

----------------------------------------------------------------------
 .../writer/DirectoryReferenceCounterTest.java      |    2 +-
 .../refcounter/DirectoryReferenceCounter.java      |    8 ++++++--
 2 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1a0b35ff/src/blur-core/src/test/java/org/apache/blur/manager/writer/DirectoryReferenceCounterTest.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/test/java/org/apache/blur/manager/writer/DirectoryReferenceCounterTest.java
b/src/blur-core/src/test/java/org/apache/blur/manager/writer/DirectoryReferenceCounterTest.java
index 35de6b7..0983930 100644
--- a/src/blur-core/src/test/java/org/apache/blur/manager/writer/DirectoryReferenceCounterTest.java
+++ b/src/blur-core/src/test/java/org/apache/blur/manager/writer/DirectoryReferenceCounterTest.java
@@ -78,7 +78,7 @@ public class DirectoryReferenceCounterTest {
     Directory directory = wrap(new RAMDirectory());
     DirectoryReferenceFileGC gc = new DirectoryReferenceFileGC();
     gc.init();
-    DirectoryReferenceCounter counter = new DirectoryReferenceCounter(directory, gc);
+    DirectoryReferenceCounter counter = new DirectoryReferenceCounter(directory, gc, null);
     IndexWriterConfig conf = new IndexWriterConfig(LUCENE_VERSION, new KeywordAnalyzer());
     IndexWriter writer = new IndexWriter(counter, conf);
     int size = 100;

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1a0b35ff/src/blur-store/src/main/java/org/apache/blur/lucene/store/refcounter/DirectoryReferenceCounter.java
----------------------------------------------------------------------
diff --git a/src/blur-store/src/main/java/org/apache/blur/lucene/store/refcounter/DirectoryReferenceCounter.java
b/src/blur-store/src/main/java/org/apache/blur/lucene/store/refcounter/DirectoryReferenceCounter.java
index 7e03974..1f21190 100644
--- a/src/blur-store/src/main/java/org/apache/blur/lucene/store/refcounter/DirectoryReferenceCounter.java
+++ b/src/blur-store/src/main/java/org/apache/blur/lucene/store/refcounter/DirectoryReferenceCounter.java
@@ -106,7 +106,9 @@ public class DirectoryReferenceCounter extends Directory {
       this.ref = ref;
       this.closer = closer;
       ref.incrementAndGet();
-      closer.add(this);
+      if (closer != null) {
+        closer.add(this);
+      }
     }
 
     @Override
@@ -121,7 +123,9 @@ public class DirectoryReferenceCounter extends Directory {
     @Override
     public RefIndexInput clone() {
       RefIndexInput refIndexInput = (RefIndexInput) super.clone();
-      closer.add(refIndexInput);
+      if (closer != null) {
+        closer.add(refIndexInput);
+      }
       refIndexInput.input = (IndexInput) input.clone();
       refIndexInput.ref.incrementAndGet();
       return refIndexInput;


Mime
View raw message