incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [4/6] git commit: No need to loop here.
Date Wed, 08 Jan 2014 03:24:13 GMT
No need to loop here.


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

Branch: refs/heads/apache-blur-0.2
Commit: a489dfeeb17705a2d4afef5adeda5f1101b32126
Parents: 3e09339
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Tue Jan 7 21:46:18 2014 -0500
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Tue Jan 7 21:46:18 2014 -0500

----------------------------------------------------------------------
 .../org/apache/blur/manager/writer/BlurIndexSimpleWriter.java    | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/a489dfee/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndexSimpleWriter.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndexSimpleWriter.java
b/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndexSimpleWriter.java
index 5c00ea9..296cb6e 100644
--- a/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndexSimpleWriter.java
+++ b/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndexSimpleWriter.java
@@ -150,9 +150,7 @@ public class BlurIndexSimpleWriter extends BlurIndex {
   @Override
   public IndexSearcherClosable getIndexSearcher() throws IOException {
     final IndexReader indexReader = _indexReader.get();
-    while (!indexReader.tryIncRef()) {
-      // keep trying to increment the ref
-    }
+    indexReader.incRef();
     return new IndexSearcherClosable(indexReader, _searchThreadPool) {
       @Override
       public Directory getDirectory() {


Mime
View raw message