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

Atomic access to multiple attributes for ensuring consistency #57

Closed
struberg opened this issue Mar 3, 2018 · 1 comment
Closed

Atomic access to multiple attributes for ensuring consistency #57

struberg opened this issue Mar 3, 2018 · 1 comment

Comments

@struberg
Copy link
Contributor

struberg commented Mar 3, 2018

Initiated by @tomas-langer we had a lot of discussions during the last EG meetings about consistent atomic access to configuration.

Consider having myapp.host + myapp.port which belong together.

now if you switch from myserver:8080 to otherserver:9090, then there is no guarantee to have consistent access.

String url = config.getValue("myapp.host");
Integer port = config.getValue("myapp.port);

Imagine that inbetween those calls the config gets updated :(

This might require to switch back ConfigSource from getPropertyNames() to go Map<String, String> getProperties() as we had it in DeltaSpike and my initial proposal.
Or find another solution.

struberg added a commit to struberg/ConfigJSR-1 that referenced this issue May 3, 2018
This code got originally developed on 2018-04-04 in Apache DeltaSpike by
Mark Struberg, Manfred Huber, Alex Falb, Gerhard Petracek and Romain Manni-Bucau
based on the problem analysis discussions between Mark Struberg and
Tomas Langer (tomas-langer) who also did reviews and gave important feedback.
struberg added a commit to struberg/ConfigJSR-1 that referenced this issue May 3, 2018
struberg added a commit that referenced this issue May 8, 2018
…sion

As agreed in the last EG meeting I gonna split out this feature into a separate
ticket (#63).
struberg added a commit that referenced this issue May 8, 2018
struberg added a commit to struberg/ConfigJSR-1 that referenced this issue May 8, 2018
@struberg
Copy link
Contributor Author

This is now resolved via the new ConfigSnapshot mechanism.

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

1 participant