mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
remove the discard operation after validation failure
This commit is contained in:
@@ -31,7 +31,7 @@ import java.sql.Connection;
|
||||
public class RandomDataSourceRecoverThread implements Runnable {
|
||||
private final static Log LOG = LogFactory.getLog(RandomDataSourceRecoverThread.class);
|
||||
private RandomDataSourceSelector selector;
|
||||
private int sleepSeconds = 60;
|
||||
private int sleepSeconds = 120;
|
||||
private int validationSleepSeconds = 0;
|
||||
|
||||
public RandomDataSourceRecoverThread(RandomDataSourceSelector selector) {
|
||||
@@ -69,9 +69,6 @@ public class RandomDataSourceRecoverThread implements Runnable {
|
||||
} catch(Exception e) {
|
||||
LOG.warn("DataSource[" + dataSource.getName() + "] is still unavailable. Exception: "
|
||||
+ e.getMessage());
|
||||
if (connection != null) {
|
||||
dataSource.discardConnection(connection);
|
||||
}
|
||||
} finally {
|
||||
JdbcUtils.close(connection);
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ public class RandomDataSourceSelector implements DataSourceSelector {
|
||||
private RandomDataSourceRecoverThread recoverThread;
|
||||
|
||||
private int checkingIntervalSeconds = 15;
|
||||
private int recoveryIntervalSeconds = 60;
|
||||
private int recoveryIntervalSeconds = 120;
|
||||
private int validationSleepSeconds = 0;
|
||||
private int blacklistThreshold = 3;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user