Skip to content

Commit 30eb238

Browse files
committed
Reset the metrics after initialisation of the pool
This is desired in the K8s case where we likely want to use initialConnection to oversize the connection pool on pod startup, with it shrinking back down over time.
1 parent b31615d commit 30eb238

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

ebean-datasource/src/main/java/io/ebean/datasource/pool/ConnectionPool.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,8 @@ private void init() {
155155
initialiseDatabase();
156156
}
157157
initialiseConnections();
158+
// reset the metrics
159+
status(true);
158160
} catch (SQLException e) {
159161
throw new DataSourceInitialiseException("Error initialising DataSource with user: " + user + " error:" + e.getMessage(), e);
160162
}

0 commit comments

Comments
 (0)