Skip to content

Commit 29c125e

Browse files
author
chengyitian
committed
AJ-753: add 'getScale' for BasicStringMatrix、BasicShortMatrix; optimize some log info for SimpleDBConnectionPoolConfig;
1 parent 1f312d1 commit 29c125e

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/com/xxdb/DBConnection.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -748,12 +748,10 @@ public boolean connect(String hostName, int port, String userId, String password
748748
this.initialScript_ = initialScript;
749749
this.enableHighAvailability_ = enableHighAvailability;
750750
this.loadBalance_ = enableLoadBalance;
751-
if (tryReconnectNums <= 0) {
751+
if (tryReconnectNums <= 0)
752752
this.tryReconnectNums = -1;
753-
log.warn("If the param 'tryReconnectNums' less than or equal to 0, when reconnect will be unlimited attempts.");
754-
} else {
753+
else
755754
this.tryReconnectNums = tryReconnectNums;
756-
}
757755

758756
if (this.loadBalance_ && !this.enableHighAvailability_)
759757
throw new RuntimeException("Cannot only enable loadbalance but not enable highAvailablity.");

src/com/xxdb/SimpleDBConnectionPoolConfig.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,13 +207,14 @@ protected void validate() {
207207
}
208208

209209
if (initialPoolSize > 0 && !isMinimumPoolSizeUserSet && !isMaximumPoolSizeUserSet) {
210-
// 兼容旧版逻辑(只填init,不填mini、max的场景):将最小、最大设置为 initialPoolSize 的值
210+
// Compatible with the old logic (only filling init, not mini and max scenarios): set the minimum and maximum to the value of initialPoolSize.
211211
minimumPoolSize = initialPoolSize;
212212
maximumPoolSize = initialPoolSize;
213213
}
214214

215215
if (initialPoolSize < 0) {
216-
// 新逻辑(不填init,如果mini、max也不填,这俩参数给默认值,填了照常取值但是要做判断):mini、max 不填的话,自动设置默认值
216+
// New logic (if init is not filled, and if mini and max are also not filled, these two parameters will be given default values;
217+
// if filled, they will be taken as usual but with validation): if mini and max are not filled, default values will be automatically set.
217218
if (minimumPoolSize <= 0) {
218219
minimumPoolSize = 5;
219220
log.warn("The param 'minimumIdle' cannot less than or equal to 0, will use the default value 5.");

0 commit comments

Comments
 (0)