pinot
pinot copied to clipboard
In the instance config, entries with same key are treated as array which can cause unexpected behavior
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
Yeah, I have been a victim of this as well. It is because of apache CommonsConfiguration class we are using.
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.