Skip to content

Commit

Permalink
Commit after schema creation for GC tool (#8290)
Browse files Browse the repository at this point in the history
By default the connections from JDBC datasource do not have autocommit
on, so when we create schema the results of that creation are then
rolled back.  This change is intentional about commiting the schema
changes.
  • Loading branch information
Highstead committed Apr 4, 2024
1 parent a9092c6 commit 8c8e70a
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ protected Integer call(Closeables closeables) throws Exception {
}
try (Connection conn = dataSource.getConnection()) {
schemaCreateStrategy.apply(conn);
// by default autocommit is set to false, so we commit here
conn.commit();
}
commandSpec
.commandLine()
Expand Down

0 comments on commit 8c8e70a

Please sign in to comment.