disable optimized decoder by default
This commit is contained in:
parent
eb1b0b150f
commit
eefbe52580
|
@ -1,5 +1,6 @@
|
||||||
package org.elasticsearch.common.compress.lzf.util;
|
package org.elasticsearch.common.compress.lzf.util;
|
||||||
|
|
||||||
|
import org.elasticsearch.common.Booleans;
|
||||||
import org.elasticsearch.common.compress.lzf.ChunkDecoder;
|
import org.elasticsearch.common.compress.lzf.ChunkDecoder;
|
||||||
import org.elasticsearch.common.compress.lzf.impl.UnsafeChunkDecoder;
|
import org.elasticsearch.common.compress.lzf.impl.UnsafeChunkDecoder;
|
||||||
import org.elasticsearch.common.compress.lzf.impl.VanillaChunkDecoder;
|
import org.elasticsearch.common.compress.lzf.impl.VanillaChunkDecoder;
|
||||||
|
@ -27,6 +28,10 @@ public class ChunkDecoderFactory {
|
||||||
if (impl == null) {
|
if (impl == null) {
|
||||||
impl = VanillaChunkDecoder.class;
|
impl = VanillaChunkDecoder.class;
|
||||||
}
|
}
|
||||||
|
// ES: Because of this: https://github.com/ning/compress/issues/13, disable the optimized by default
|
||||||
|
if (!Booleans.parseBoolean(System.getProperty("compress.lzf.decoder.optimized"), false)) {
|
||||||
|
impl = VanillaChunkDecoder.class;
|
||||||
|
}
|
||||||
_instance = new ChunkDecoderFactory(impl);
|
_instance = new ChunkDecoderFactory(impl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue