aeron
aeron copied to clipboard
[C] aeron_properties_load should not fail on non-existing file/resource
The Java side uses org.agrona.SystemUtil#loadPropertiesFiles(java.lang.String...)
API which ignores non-existing files/resources. However the C implementation of the aeron_properties_file_load
fails with error if file cannot be opened. This leads to media driver failing to start if executed from a script that points to some default files (e.g. c-media-driver
script from the benchmarks project).
Is a silent failure a really good thing for this?
@tmontgomery It is a question of compatibility between Java and C versions of the same code. Java ignores non-existing files whereas C fails with an error. Maybe we a new Java method that would fail as well and use that instead.
Paging @mjpt777.
The Java version has been doing this for years and @tmontgomery added it in the beginning. We could add a new flag to warn or error if it does not exist if that is a concern. Regardless of approach, I believe it is best for customers if the drivers are fungible.
Agree on them being compatible. And I am aware how it works. The question is more.... "should it" ignore a non-existent file. In the Java version, it does a try and see approach for various options (HTTP, file, etc.). I've never been totally happy with that. And it has bitten me recently. Hence the question.