Skip to content

Commit

Permalink
inner-2388: modify default value of skipTestConOnUpdate &fix 2383 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dcy10000 committed May 22, 2024
1 parent 9581f11 commit 039e150
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,7 @@ public void testConnection() {
boolean skipTestConnectionOnUpdate = false;
if (SystemConfig.getInstance().isSkipTestConOnUpdate()) {
if (reloadContext != null && !reloadContext.getAffectDbInstanceList().isEmpty()) {
if (reloadContext.getConfStatus() == ConfStatus.Status.MANAGER_DELETE) {
skipTestConnectionOnUpdate = true;
LOGGER.info("will skip all test connection.");
} else {
if (reloadContext.getConfStatus() != ConfStatus.Status.MANAGER_DELETE) {
boolean useSharding = reloadContext.getAffectDbInstanceList().stream().map(ele -> dbGroups.get(ele.getGroupName())).anyMatch((ele) -> ele != null && !ele.isShardingUseless());

//not support for sharding db group
Expand Down Expand Up @@ -246,7 +243,7 @@ public void testConnection() {
boolean find = reloadContext.getAffectDbInstanceList().stream().anyMatch((ele) -> ele.getGroupName().equals(finalDbGroupName) && ele.getInstanceName().equals(ds.getName()));
if (!find) {
//skip test connection on this dbInstance
ds.setTestConnSuccess(true);
ds.setTestConnSuccess(false);
LOGGER.info("dbGroup[" + ds.getDbGroupConfig().getName() + "] instance " + ds.getName() + " is skiped,because of option skipTestConOnUpdate");
continue;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ private SystemConfig() {
private int useCostTimeStat = 0;
private int maxCostStatSize = 100;
private int costSamplePercent = 1;
private boolean skipTestConOnUpdate = false;
private boolean skipTestConOnUpdate = true;
//connection
private String charset = "utf8mb4";
private int maxPacketSize = 4 * 1024 * 1024;
Expand Down

0 comments on commit 039e150

Please sign in to comment.