Don't pull translog from shadow engine

ShadowEngine doesn't have a translog but instead throws an
UOE when it's requested. ShadowIndexShard should not try to pull
stats for the translog either and should return null instead.

Closes #12730
This commit is contained in:
Simon Willnauer 2015-10-07 20:47:58 +02:00
parent 3851093483
commit bfa0202816
1 changed files with 6 additions and 0 deletions

View File

@ -26,6 +26,7 @@ import org.elasticsearch.index.engine.EngineConfig;
import org.elasticsearch.index.merge.MergeStats;
import org.elasticsearch.index.settings.IndexSettings;
import org.elasticsearch.index.store.Store;
import org.elasticsearch.index.translog.TranslogStats;
import java.io.IOException;
@ -82,4 +83,9 @@ public final class ShadowIndexShard extends IndexShard {
public boolean allowsPrimaryPromotion() {
return false;
}
@Override
public TranslogStats translogStats() {
return null; // shadow engine has no translog
}
}