The DocValuesConsumerUtil class contains static methods that determine whether or not a lucene merge can take an optimized path. Codecs that result in UNSUPPORTED merge stats being returned from these methods will pay a hefty penalty in their merge performance. However, it is tricky to detect this outside of benchmarks, as we don't have a good way of testing them directly - the method calls are deep inside the merge machinery and require a lot of set-up.
We should build some test classes that allow us to easily test if a custom Codec is using the optimized merge path. This would allow us to detect regressions in CI, rather than having to spot changes in nightly benchmarks after the fact.
The
DocValuesConsumerUtilclass contains static methods that determine whether or not a lucene merge can take an optimized path. Codecs that result inUNSUPPORTEDmerge stats being returned from these methods will pay a hefty penalty in their merge performance. However, it is tricky to detect this outside of benchmarks, as we don't have a good way of testing them directly - the method calls are deep inside the merge machinery and require a lot of set-up.We should build some test classes that allow us to easily test if a custom Codec is using the optimized merge path. This would allow us to detect regressions in CI, rather than having to spot changes in nightly benchmarks after the fact.