Skip to content

Commit 032678f

Browse files
committed
Remove unused refreshScheduledFuture in IndexShard
It has been replaced by the logic in IndexService
1 parent ef4293a commit 032678f

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

core/src/main/java/org/elasticsearch/index/shard/IndexShard.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,7 @@
4848
import org.elasticsearch.common.unit.TimeValue;
4949
import org.elasticsearch.common.util.Callback;
5050
import org.elasticsearch.common.util.concurrent.AbstractRunnable;
51-
import org.elasticsearch.common.util.concurrent.FutureUtils;
5251
import org.elasticsearch.common.util.concurrent.SuspendableRefContainer;
53-
import org.elasticsearch.gateway.MetaDataStateFormat;
5452
import org.elasticsearch.index.IndexModule;
5553
import org.elasticsearch.index.IndexSettings;
5654
import org.elasticsearch.index.NodeServicesProvider;
@@ -122,7 +120,6 @@
122120
import java.util.Map;
123121
import java.util.Objects;
124122
import java.util.concurrent.CopyOnWriteArrayList;
125-
import java.util.concurrent.ScheduledFuture;
126123
import java.util.concurrent.TimeUnit;
127124
import java.util.concurrent.atomic.AtomicBoolean;
128125
import java.util.concurrent.atomic.AtomicLong;
@@ -159,7 +156,6 @@ public class IndexShard extends AbstractIndexShardComponent {
159156
* being indexed/deleted. */
160157
private final AtomicLong writingBytes = new AtomicLong();
161158

162-
private volatile ScheduledFuture<?> refreshScheduledFuture;
163159
protected volatile ShardRouting shardRouting;
164160
protected volatile IndexShardState state;
165161
protected final AtomicReference<Engine> currentEngineReference = new AtomicReference<>();
@@ -784,10 +780,6 @@ public Engine.Searcher acquireSearcher(String source) {
784780
public void close(String reason, boolean flushEngine) throws IOException {
785781
synchronized (mutex) {
786782
try {
787-
if (state != IndexShardState.CLOSED) {
788-
FutureUtils.cancel(refreshScheduledFuture);
789-
refreshScheduledFuture = null;
790-
}
791783
changeState(IndexShardState.CLOSED, reason);
792784
} finally {
793785
final Engine engine = this.currentEngineReference.getAndSet(null);

0 commit comments

Comments
 (0)