Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,14 @@ public void init(Config config) {
config.get(Configs.ENTITY_RELATIONAL_JDBC_BACKEND_WAIT_MILLISECONDS));
dataSource.setMaxTotal(config.get(Configs.ENTITY_RELATIONAL_JDBC_BACKEND_MAX_CONNECTIONS));
dataSource.setMaxIdle(5);
dataSource.setMinIdle(0);
dataSource.setMinIdle(5);
dataSource.setLogAbandoned(true);
Comment on lines 90 to 93
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

The idle-size value 5 is now duplicated between setMaxIdle(5) and setMinIdle(5). Consider defining a single constant (or deriving one from the other) to prevent future mismatches when tuning the pool.

Copilot uses AI. Check for mistakes.
dataSource.setRemoveAbandonedOnBorrow(true);
dataSource.setRemoveAbandonedTimeout(60);
dataSource.setTimeBetweenEvictionRunsMillis(Duration.ofMillis(10 * 60 * 1000L).toMillis());
dataSource.setTestOnBorrow(true);
dataSource.setTestWhileIdle(true);
dataSource.setMinEvictableIdleTimeMillis(1000);
dataSource.setMinEvictableIdleTimeMillis(Duration.ofSeconds(30).toMillis());
Comment on lines 90 to +99
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

The pool settings change (minIdle/minEvictableIdleTimeMillis) isn’t currently covered by a unit assertion. Please add/extend a test (e.g., in TestSqlSession#testInit) to verify the configured BasicDataSource values so this behavior change is protected from regressions.

Copilot generated this review using guidance from repository custom instructions.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Those changes do not need UTs to cover it.

dataSource.setNumTestsPerEvictionRun(BaseObjectPoolConfig.DEFAULT_NUM_TESTS_PER_EVICTION_RUN);
dataSource.setTestOnReturn(BaseObjectPoolConfig.DEFAULT_TEST_ON_RETURN);
dataSource.setSoftMinEvictableIdleTimeMillis(
Expand Down
Loading