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:
parent
3851093483
commit
bfa0202816
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue