Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[C] aeron_properties_load should not fail on non-existing file/resource #1124

Open
vyazelenko opened this issue Jan 14, 2021 · 4 comments
Open

Comments

@vyazelenko
Copy link
Contributor

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).

@tmontgomery
Copy link
Contributor

Is a silent failure a really good thing for this?

@vyazelenko
Copy link
Contributor Author

@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.

@mjpt777
Copy link
Contributor

mjpt777 commented Jan 14, 2021

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.

@tmontgomery
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants