1
0
Эх сурвалжийг харах

Merge pull request #12917 from HarishAtGitHub/refactorprocessFirstPhase

Refactor - shard variable dependency from processFirstPhaseResults as shard is no more needed
Simon Willnauer 10 жил өмнө
parent
commit
5699492575

+ 2 - 2
core/src/main/java/org/elasticsearch/action/search/type/TransportSearchTypeAction.java

@@ -180,7 +180,7 @@ public abstract class TransportSearchTypeAction extends TransportAction<SearchRe
 
         void onFirstPhaseResult(int shardIndex, ShardRouting shard, FirstResult result, ShardIterator shardIt) {
             result.shardTarget(new SearchShardTarget(shard.currentNodeId(), shard.index(), shard.id()));
-            processFirstPhaseResult(shardIndex, shard, result);
+            processFirstPhaseResult(shardIndex, result);
             // we need to increment successful ops first before we compare the exit condition otherwise if we
             // are fast we could concurrently update totalOps but then preempt one of the threads which can
             // cause the successor to read a wrong value from successfulOps if second phase is very fast ie. count etc.
@@ -358,7 +358,7 @@ public abstract class TransportSearchTypeAction extends TransportAction<SearchRe
 
         protected abstract void sendExecuteFirstPhase(DiscoveryNode node, ShardSearchTransportRequest request, ActionListener<FirstResult> listener);
 
-        protected final void processFirstPhaseResult(int shardIndex, ShardRouting shard, FirstResult result) {
+        protected final void processFirstPhaseResult(int shardIndex, FirstResult result) {
             firstResults.set(shardIndex, result);
 
             if (logger.isTraceEnabled()) {