Skip to content

Commit 7b3a0b1

Browse files
committed
add warning for !allow-pool-suspension as new connections will be created in this case (#42906)
1 parent bc6939a commit 7b3a0b1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/jdbc/HikariCheckpointRestoreLifecycle.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@ public void stop() {
109109
logger.info("Suspending Hikari pool");
110110
this.dataSource.getHikariPoolMXBean().suspendPool();
111111
}
112+
else {
113+
logger.warn(this.dataSource + " is not configured to allow pool suspension. "
114+
+ "This will cause problems when the application is checkpointed. "
115+
+ "Please configure allow-pool-suspension to fix this!");
116+
}
112117
closeConnections(Duration.ofMillis(this.dataSource.getConnectionTimeout() + 250));
113118
}
114119

0 commit comments

Comments
 (0)