geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [08/15] geode git commit: GEODE-2367: ResultCollector for LuceneQuery needs to be reinstantiated on retry
Date Mon, 30 Jan 2017 20:52:55 GMT
GEODE-2367: ResultCollector for LuceneQuery needs to be reinstantiated on retry


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

Branch: refs/heads/feature/GEODE-1930-2
Commit: b529568dcd15b664a108d2cee5c783cb6b6ef79f
Parents: 917dfa0
Author: Jason Huynh <huynhja@gmail.com>
Authored: Mon Jan 30 09:41:31 2017 -0800
Committer: Jason Huynh <huynhja@gmail.com>
Committed: Mon Jan 30 11:31:41 2017 -0800

----------------------------------------------------------------------
 .../org/apache/geode/cache/lucene/internal/LuceneQueryImpl.java  | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/b529568d/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneQueryImpl.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneQueryImpl.java
b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneQueryImpl.java
index d73acc6..0e8bb37 100644
--- a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneQueryImpl.java
+++ b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneQueryImpl.java
@@ -105,15 +105,13 @@ public class LuceneQueryImpl<K, V> implements LuceneQuery<K,
V> {
     TopEntriesCollectorManager manager = new TopEntriesCollectorManager(null, limit);
     LuceneFunctionContext<TopEntriesCollector> context =
         new LuceneFunctionContext<>(query, indexName, manager, limit);
-    TopEntriesFunctionCollector collector = new TopEntriesFunctionCollector(context);
-
-
 
     // TODO provide a timeout to the user?
     TopEntries<K> entries = null;
     int numTries = 0;
     while (entries == null && numTries++ < MAX_TRIES) {
       try {
+        TopEntriesFunctionCollector collector = new TopEntriesFunctionCollector(context);
         ResultCollector<TopEntriesCollector, TopEntries<K>> rc =
             (ResultCollector<TopEntriesCollector, TopEntries<K>>) onRegion().withArgs(context)
                 .withCollector(collector).execute(LuceneFunction.ID);


Mime
View raw message