pinot icon indicating copy to clipboard operation
pinot copied to clipboard

In the instance config, entries with same key are treated as array which can cause unexpected behavior

Open Jackie-Jiang opened this issue 3 years ago • 2 comments

E.g. In the controller config:

controller.enable.split.commit=true
controller.enable.split.commit=true

will be treated as

controller.enable.split.commit=true,true

and then when pinot parses the value, true,true will be parsed as false

This can cause big confusion. We should consider not allowing multiple entries with the same key, but that can cause backward incompatibility. Need to figure out a solution

Jackie-Jiang avatar Jul 25 '22 22:07 Jackie-Jiang

Yeah, I have been a victim of this as well. It is because of apache CommonsConfiguration class we are using.

KKcorps avatar Jul 26 '22 15:07 KKcorps

I think the issue is from CommonsConfigurationUtils.toMap() which automatically combine values with the same key as a list. I tried directly using PropertiesConfiguration.getBoolean() on the same config, and it can correctly pick the first config, and returns true.

Jackie-Jiang avatar Jul 27 '22 21:07 Jackie-Jiang