-
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
Generalize extensions #23
Conversation
Signed-off-by: BOUHOURS Antoine <[email protected]>
f945820
to
365c6e0
Compare
Signed-off-by: BOUHOURS Antoine <[email protected]>
365c6e0
to
3b41004
Compare
…re-server into generalize-extension
Signed-off-by: BOUHOURS Antoine <[email protected]>
Signed-off-by: BOUHOURS Antoine <[email protected]>
06afaf9
to
7abae19
Compare
Signed-off-by: BOUHOURS Antoine <[email protected]>
7abae19
to
e544543
Compare
Signed-off-by: BOUHOURS Antoine <[email protected]>
" = ? and " + VARIANT_NUM_COLUMN + " = ?"; | ||
} | ||
|
||
public static String buildExtensionsQuery(String columnNameForWhereClause) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
buildGetExtensionsQuery ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, thanks!
Fixed in 99469ab.
columnNameForWhereClause + " = ?"; | ||
} | ||
|
||
public static String buildExtensionsWithInClauseQuery(String columnNameForInClause, int numberOfValues) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
buildGetExtensionsWithInClauseQuery ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, thanks!
Fixed in 99469ab.
Signed-off-by: BOUHOURS Antoine <[email protected]>
…re-server into generalize-extension
Signed-off-by: BOUHOURS Antoine <[email protected]>
|
Please check if the PR fulfills these requirements
What kind of change does this PR introduce?
It adds the ability to handle extensions discovered by service loader in the network store in a separate table "extension" instead of storing the extension with the identifiable. This introduces the possibility of not having the implementation of the extension in the network-store.
3 existing extensions have been migrated to this new framework: OperatingStatus, GeneratorStartup, ActivePowerControl.
The migration from the old framework to the new one is handled with SQL script in Liquibase.
This PR relies on powsybl/powsybl-network-store#383
Notes
→ Dump of dev-opf data => 7866159 extensions (OperatingStatus, GeneratorStartup or ActivePowerControl), migrated in 1 minute.
→ The data migration is only done for postgres but the schema migration for all dbms.
→ The migration does not drop the columns activePowerControl, operatingStatus and startup. This will be done in a future migration to be able to fallback on the previous implementation without data loss.
→ I haven't found a way to deserialize the json without adding the "extensionName" field when storing it (e.g.
{"extensionName":"activePowerControl","participate":true,"droop":0.0,"participationFactor":"NaN"}
). The extensionName value is already stored in the "name" column so we could use it (?).→ I added a runtime dependencies to powsybl-network-store-iidm-impl to be able to discover ExtensionLoaders in this dependency at runtime.
→ On my computer, on a THT/HT study with 12000 extensions and ~6000 generators, we measure the time spent in NetworkStoreRepository methods only: