-
Notifications
You must be signed in to change notification settings - Fork 1
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
Lazy loading of extension attributes + powsybl-ws-dependencies 2.15.0 #49
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: BOUHOURS Antoine <[email protected]>
Signed-off-by: BOUHOURS Antoine <[email protected]>
Signed-off-by: BOUHOURS Antoine <[email protected]>
3 tasks
…re-server into lazy-loading-extension-attributes
Signed-off-by: BOUHOURS Antoine <[email protected]>
jonenst
approved these changes
Sep 2, 2024
…re-server into lazy-loading-extension-attributes
…re-server into lazy-loading-extension-attributes
Signed-off-by: BOUHOURS Antoine <[email protected]>
SlimaneAmar
approved these changes
Sep 23, 2024
...ation-test/src/test/java/com/powsybl/network/store/integration/NetworkStoreExtensionsIT.java
Show resolved
Hide resolved
network-store-server/src/main/java/com/powsybl/network/store/server/NetworkStoreController.java
Outdated
Show resolved
Hide resolved
network-store-server/src/main/java/com/powsybl/network/store/server/NetworkStoreController.java
Outdated
Show resolved
Hide resolved
Signed-off-by: BOUHOURS Antoine <[email protected]>
Signed-off-by: BOUHOURS Antoine <[email protected]>
Signed-off-by: BOUHOURS Antoine <[email protected]>
Signed-off-by: BOUHOURS Antoine <[email protected]>
Quality Gate passedIssues Measures |
antoinebhs
changed the title
Lazy loading of extension attributes
Lazy loading of extension attributes + powsybl-ws-dependencies 2.15.0
Sep 25, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please check if the PR fulfills these requirements
What kind of change does this PR introduce?
Instead of loading all the extension attributes of an identifiable when fetching the identifiable, the extension attributes are lazily loaded when needed (i.e: when getExtension(), getExtensionByName(), getExtensions() or removeExtension() are called).
This evolution is reflected in network-store (powsybl/powsybl-network-store#411).
What is the current behavior?
In the current implementation, whenever the identifiable is retrieved from the store, the extension attributes are loaded with the identifiable in the extensionAttributes Map<extensionName, extensionAttributes>. This behavior implies that all the services using the network-store need to have the deserializer for all the extensions in the network. This is an important limitation as it forces us to create a lot of docker images for services that don't even need to deserialize these extensions as they don't use them.
What is the new behavior (if this is a feature change)?
The endpoints necessary for the network-store lazy loading implementation of extension attributes to work are implemented in this PR. More details in powsybl/powsybl-network-store#411. Corresponding test and queries are updated to fetch the corresponding data.
In the previous implementation, when extensions were updated, we removed all the extensions of the identifiable and replaced them with the updated ones. In the proposed implementation, we remove only extensions that were loaded in the resources to avoid removing extension attributes that need to be kept.