Skip to content

Conversation

@evan-miller-jumpmind
Copy link
Contributor

It would have been good to limit the information_schema.sequences query to only run on an upgrade from 3.16.7 or earlier. Usually there's a check for a particular schema change to determine the version that is being upgraded from, but there are no schema changes in the upgrade from an earlier 3.16 version to 3.16.8.

If it isn't okay to run this query every time an H2 node is upgraded, then I could make this change in 3.17.0 instead or I could try checking sym_node.symmetric_version instead of relying on a schema change.

@evan-miller-jumpmind evan-miller-jumpmind requested a review from a team as a code owner November 19, 2025 17:20
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

engine.getNodeId(), engine.getNodeId());
}
if (engine.getDatabasePlatform().getName().equals(DatabaseNamesConstants.H2)) {
String dataIdSequenceName = symmetricDialect.getSequenceName(SequenceIdentifier.DATA).toUpperCase() + "_SEQ";
Copy link
Contributor

@pavel-jm pavel-jm Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code block is large yet it applies only to H2 database. One way to improve readability (and test-ability) is to move code to a separate utility method.
Another path to consider is a new H2-specific upgrade listener class?
(We can review this in our Thursday meeting)

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

Successfully merging this pull request may close these issues.

3 participants