-
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
optimize temporary and permanent limits db writings and db reading #82
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
<customChange class="com.powsybl.network.store.server.migrations.PermanentLimitsMigration"/> | ||
<customChange class="com.powsybl.network.store.server.migrations.TemporaryLimitsMigration"/> | ||
<renameTable oldTableName="newpermanentlimits" | ||
newTableName="permanentlimits"/> |
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.
Before this, drop permanentlimit table.
And rename to permanentlimit
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.
I rename to permanentlimits and it was permanentlimit before do you agree ? same for temporarylimits
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.
We can keep permanentlimit I think. All table names use the singular
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.
Discussed with Etienne L: we keep the plurial as one row of permanentLimits contains several permanent limits
<renameTable oldTableName="newpermanentlimits" | ||
newTableName="permanentlimits"/> | ||
<renameTable oldTableName="newtemporarylimits" | ||
newTableName="temporarylimits"/> |
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.
same here
network-store-server/src/main/java/com/powsybl/network/store/server/QueryCatalog.java
Outdated
Show resolved
Hide resolved
network-store-server/src/main/java/com/powsybl/network/store/server/QueryCatalog.java
Outdated
Show resolved
Hide resolved
network-store-server/src/main/java/com/powsybl/network/store/server/QueryCatalog.java
Outdated
Show resolved
Hide resolved
network-store-server/src/main/java/com/powsybl/network/store/server/TemporaryLimitSqlData.java
Outdated
Show resolved
Hide resolved
network-store-server/src/main/java/com/powsybl/network/store/server/QueryCatalog.java
Outdated
Show resolved
Hide resolved
network-store-server/src/main/java/com/powsybl/network/store/server/PermanentLimitSqlData.java
Outdated
Show resolved
Hide resolved
network-store-server/src/main/resources/db/changelog/changesets/changelog_20241121T110000Z.xml
Outdated
Show resolved
Hide resolved
network-store-server/src/main/resources/db/changelog/changesets/changelog_20241121T110000Z.xml
Outdated
Show resolved
Hide resolved
network-store-server/src/main/java/com/powsybl/network/store/server/PermanentLimitSqlData.java
Outdated
Show resolved
Hide resolved
network-store-server/src/main/java/com/powsybl/network/store/server/TemporaryLimitSqlData.java
Outdated
Show resolved
Hide resolved
...rver/src/main/java/com/powsybl/network/store/server/migrations/PermanentLimitsMigration.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
Quality Gate failedFailed conditions |
@@ -0,0 +1,22 @@ | |||
-- will be used in next deployment |
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.
I was thinking of doing the liquibase migration by doing a java change that just calls the same method as the one used for users
static final String SELECTED_OPERATIONAL_LIMITS_GROUP_ID_COLUMN = "selectedOperationalLimitsGroupId"; | ||
static final String TEMPORARY_LIMITS_TABLE = "newtemporarylimits"; | ||
static final String TEMPORARY_LIMITS = "temporarylimits"; | ||
static final String OLD_TEMPORARY_LIMITS = "temporarylimit"; |
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.
need to find a better name than old because this code is going to stay if it goes in the liquibase changeset. Maybe "V211LimitMigration"
return "delete from temporarylimit where " + | ||
NETWORK_UUID_COLUMN + " = ? and " + | ||
VARIANT_NUM_COLUMN + " = ?"; | ||
public static String buildOldTemporaryLimitWithInClauseQuery(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.
move to the folder of the liquibase migrations
Do we need an extra management endpoint to externally migrate the data or is it enough to call the regular GET endpoint? probably the get is enough |
Please check if the PR fulfills these requirements
Does this PR already have an issue describing the problem?
What kind of change does this PR introduce?
What is the current behavior?
What is the new behavior (if this is a feature change)?
Does this PR introduce a breaking change or deprecate an API?
If yes, please check if the following requirements are fulfilled
What changes might users need to make in their application due to this PR? (migration steps)
Other information: