|
48 | 48 | import org.elasticsearch.common.unit.TimeValue; |
49 | 49 | import org.elasticsearch.common.util.Callback; |
50 | 50 | import org.elasticsearch.common.util.concurrent.AbstractRunnable; |
51 | | -import org.elasticsearch.common.util.concurrent.FutureUtils; |
52 | 51 | import org.elasticsearch.common.util.concurrent.SuspendableRefContainer; |
53 | | -import org.elasticsearch.gateway.MetaDataStateFormat; |
54 | 52 | import org.elasticsearch.index.IndexModule; |
55 | 53 | import org.elasticsearch.index.IndexSettings; |
56 | 54 | import org.elasticsearch.index.NodeServicesProvider; |
|
122 | 120 | import java.util.Map; |
123 | 121 | import java.util.Objects; |
124 | 122 | import java.util.concurrent.CopyOnWriteArrayList; |
125 | | -import java.util.concurrent.ScheduledFuture; |
126 | 123 | import java.util.concurrent.TimeUnit; |
127 | 124 | import java.util.concurrent.atomic.AtomicBoolean; |
128 | 125 | import java.util.concurrent.atomic.AtomicLong; |
@@ -159,7 +156,6 @@ public class IndexShard extends AbstractIndexShardComponent { |
159 | 156 | * being indexed/deleted. */ |
160 | 157 | private final AtomicLong writingBytes = new AtomicLong(); |
161 | 158 |
|
162 | | - private volatile ScheduledFuture<?> refreshScheduledFuture; |
163 | 159 | protected volatile ShardRouting shardRouting; |
164 | 160 | protected volatile IndexShardState state; |
165 | 161 | protected final AtomicReference<Engine> currentEngineReference = new AtomicReference<>(); |
@@ -784,10 +780,6 @@ public Engine.Searcher acquireSearcher(String source) { |
784 | 780 | public void close(String reason, boolean flushEngine) throws IOException { |
785 | 781 | synchronized (mutex) { |
786 | 782 | try { |
787 | | - if (state != IndexShardState.CLOSED) { |
788 | | - FutureUtils.cancel(refreshScheduledFuture); |
789 | | - refreshScheduledFuture = null; |
790 | | - } |
791 | 783 | changeState(IndexShardState.CLOSED, reason); |
792 | 784 | } finally { |
793 | 785 | final Engine engine = this.currentEngineReference.getAndSet(null); |
|
0 commit comments