mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-25 14:26:27 +00:00
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.merge.MergeStats;
|
||||||
import org.elasticsearch.index.settings.IndexSettings;
|
import org.elasticsearch.index.settings.IndexSettings;
|
||||||
import org.elasticsearch.index.store.Store;
|
import org.elasticsearch.index.store.Store;
|
||||||
|
import org.elasticsearch.index.translog.TranslogStats;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
@ -82,4 +83,9 @@ public final class ShadowIndexShard extends IndexShard {
|
|||||||
public boolean allowsPrimaryPromotion() {
|
public boolean allowsPrimaryPromotion() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TranslogStats translogStats() {
|
||||||
|
return null; // shadow engine has no translog
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user