Adding new dynamic configurations to Druid can result in difficulties upgrading if proper precautions in the code are not taken. Also, the precautions taken in the code to date are a bit messy. Ideally we come up with a more elegant way to add new dynamic configurations.
This is an explicit example: #11135
Adding the new configuration that is an int with a non-zero default requires manually catching null if the config is missing and setting it to the default non-zero value. Not doing this would mean that the missing value would result in the config being set to 0 during object serialization when the coordinator restarts for the upgrade. In this case, 0 is not a desirable default and will drastically change coordinator behavior as compared to pre-upgrade.
It would be ideal if there was a more elegant way to achieve the non-zero than what is implemented today.
Adding new dynamic configurations to Druid can result in difficulties upgrading if proper precautions in the code are not taken. Also, the precautions taken in the code to date are a bit messy. Ideally we come up with a more elegant way to add new dynamic configurations.
This is an explicit example: #11135
Adding the new configuration that is an int with a non-zero default requires manually catching
nullif the config is missing and setting it to the default non-zero value. Not doing this would mean that the missing value would result in the config being set to 0 during object serialization when the coordinator restarts for the upgrade. In this case, 0 is not a desirable default and will drastically change coordinator behavior as compared to pre-upgrade.It would be ideal if there was a more elegant way to achieve the non-zero than what is implemented today.