fix scheduling to actually schedule the correct runnable

This commit is contained in:
kimchy 2011-02-16 02:44:24 +02:00
parent d1d3f8c4ca
commit 087f5d6bea
2 changed files with 2 additions and 2 deletions

View File

@ -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);
}
}
});

View File

@ -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);
}
}
});