From 087f5d6bea68a8498e029ff55c03ba88727350fd Mon Sep 17 00:00:00 2001 From: kimchy Date: Wed, 16 Feb 2011 02:44:24 +0200 Subject: [PATCH] fix scheduling to actually schedule the correct runnable --- .../elasticsearch/index/shard/service/InternalIndexShard.java | 2 +- .../java/org/elasticsearch/index/translog/TranslogService.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/shard/service/InternalIndexShard.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/shard/service/InternalIndexShard.java index 3eed4a59cc8..6a10557f9ba 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/shard/service/InternalIndexShard.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/shard/service/InternalIndexShard.java @@ -635,7 +635,7 @@ public class InternalIndexShard extends AbstractIndexShardComponent implements I logger.warn("Failed to perform scheduled engine refresh", e); } if (state != IndexShardState.CLOSED) { - refreshScheduledFuture = threadPool.schedule(refreshInterval, ThreadPool.Names.SAME, this); + refreshScheduledFuture = threadPool.schedule(refreshInterval, ThreadPool.Names.SAME, EngineRefresher.this); } } }); diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/translog/TranslogService.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/translog/TranslogService.java index 80dcd989092..a40557d3505 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/translog/TranslogService.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/translog/TranslogService.java @@ -127,7 +127,7 @@ public class TranslogService extends AbstractIndexShardComponent { lastFlushTime = System.currentTimeMillis(); if (indexShard.state() != IndexShardState.CLOSED) { - future = threadPool.schedule(interval, ThreadPool.Names.SAME, this); + future = threadPool.schedule(interval, ThreadPool.Names.SAME, TranslogBasedFlush.this); } } });