From 6d97102b6b18fc3d8f433f2c52b3e140fca7f2e1 Mon Sep 17 00:00:00 2001 From: aressu1985 <47846308+aressu1985@users.noreply.github.com> Date: Tue, 30 Jan 2024 13:56:35 +0800 Subject: [PATCH] Add config reconnect timeout (#161) * modify socketTimeout to 120s * add regular match * support rc + Pessimistic * revert Fix pessimistic commit wait error * revert revert * add reconnect timeout config --- lib/mo-tester-1.0-SNAPSHOT.jar | Bin 79954 -> 79869 bytes mo.yml | 4 +++ src/main/java/io/mo/Tester.java | 4 +++ src/main/java/io/mo/db/ConnectionManager.java | 28 ++++++++++-------- 4 files changed, 23 insertions(+), 13 deletions(-) diff --git a/lib/mo-tester-1.0-SNAPSHOT.jar b/lib/mo-tester-1.0-SNAPSHOT.jar index 03ec74e4ed248493a5c42b9b6736fac29b573d2c..d6127a1d8fabb958e7ffe9afab108282a34b500d 100644 GIT binary patch delta 10383 zcmZ8{1yEc|(>9Ac!Cive;?82hJxFkO4eqkRU4kuc!3pjXWO26yf&|y#lHlP_$i44Z z_div;{d7-vPtTsSQ(b4C*)#aZQ+SNmig56#Fn=xy2HGCs>iSo(i-!enAN>}L#wV|bR@aLms#6pr?fY^a2LMEMIaqMx%i2)y`- z@oeFwVEAj%r_w@xwlp#tqdo%yZgr$*U@v6(*JlpIkNIrDP?Usw1{x~;c+Y^uyyCfr zh9P(3ze7ykItb50p#c+r^Js=S0G=&<;h*52K}gKPUuVOF!@pA~CZ+r>bu()l73FvF zI#eW=0sF~QC5(Wk zTi*RjR#x|~Uyn@hY(H-jiA%lG?4=4P3Rjl37t{;$6ZK-49&8H9__MUihH$N9Sh;4-@r$Z z<(zbGC6r1$kCe&LU)e)9KM1t7tl)~@3Jul9&kh~UKOzVhI1KL;vYwTh0X1}~T`{zly@;43p?B$9v{Yjx3 zRrz!ixf6>w6;&>M5En#ix*~jw#N$P*h7x}*@|NOzbi#X^dUbz-+Qh{}I&+*oS|z4w zaoxD%WSl;eoCTpc>+LmY)!;eeY6?fyISCTGn~LO;`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@@ jdbc: useLocalSessionState: "true" zeroDateTimeBehavior: "CONVERT_TO_NULL" failoverReadOnly: "false" + initialTimeout: 60 + autoReconnect: "true" + maxReconnects: 4 serverTimezone: "Asia/Shanghai" socketTimeout: 120000 + #users user: name: "dump" diff --git a/src/main/java/io/mo/Tester.java b/src/main/java/io/mo/Tester.java index cd9de4e00..91445953c 100755 --- a/src/main/java/io/mo/Tester.java +++ b/src/main/java/io/mo/Tester.java @@ -320,6 +320,10 @@ public static boolean isInclude(String name){ public static void cleanDatabases(){ Connection connection = ConnectionManager.getConnection(); + if(connection == null){ + LOG.error("Failed to clean databases,please check the error,the program will exit."); + System.exit(1); + } String dropDB = "DROP DATABASE IF EXISTS `%s`"; String[] dbs = RunConfUtil.getBuiltinDb(); try { diff --git a/src/main/java/io/mo/db/ConnectionManager.java b/src/main/java/io/mo/db/ConnectionManager.java index 6c7ad52cb..1d61680cf 100755 --- a/src/main/java/io/mo/db/ConnectionManager.java +++ b/src/main/java/io/mo/db/ConnectionManager.java @@ -34,7 +34,7 @@ public static Connection getConnection(int index){ if(!server_up) return null; //get db connection,if failed,retry 3 times 10 s interval - for(int i = 0; i < 3; i++) { + //for(int i = 0; i < 3; i++) { try { Class.forName(driver); if (connections[index] == null || connections[index].isClosed()) { @@ -43,7 +43,8 @@ public static Connection getConnection(int index){ } return connections[index]; } catch (SQLException e) { - LOG.error("The mo-tester can not get valid conneciton from mo with[user="+userName+", pwd="+pwd+"], and will wait 10 seconds and retry..."); + //LOG.error("The mo-tester can not get valid conneciton from mo with[user="+userName+", pwd="+pwd+"], and will wait 10 seconds and retry..."); + LOG.error(e.getMessage()); try { Thread.sleep(10000); } catch (InterruptedException ex) { @@ -52,9 +53,9 @@ public static Connection getConnection(int index){ } catch (ClassNotFoundException e) { e.printStackTrace(); } - } - - LOG.error("The mo-tester still can not get valid conneciton from mo, the following cases wil not be executed!"); + //} + + LOG.error("The mo-tester can not get valid conneciton from mo with[user="+userName+", pwd="+pwd+"], the following cases wil not be executed!"); server_up = false; return null; } @@ -64,7 +65,7 @@ public static Connection getConnection(int index, String userName, String pwd){ if(!server_up) return null; //get db connection,if failed,retry 3 times 10 s interval - for(int i = 0; i < 3; i++) { + //for(int i = 0; i < 3; i++) { try { Class.forName(driver); if (connections[index] == null || connections[index].isClosed()) { @@ -74,7 +75,8 @@ public static Connection getConnection(int index, String userName, String pwd){ } return connections[index]; } catch (SQLException e) { - LOG.error("The mo-tester can not get valid conneciton from mo with[user="+userName+", pwd="+pwd+"], and will wait 10 seconds and retry..."); + //LOG.error("The mo-tester can not get valid conneciton from mo with[user="+userName+", pwd="+pwd+"], and will wait 10 seconds and retry..."); + LOG.error(e.getMessage()); try { Thread.sleep(10000); } catch (InterruptedException ex) { @@ -83,9 +85,9 @@ public static Connection getConnection(int index, String userName, String pwd){ } catch (ClassNotFoundException e) { e.printStackTrace(); } - } + //} - LOG.error("The mo-tester still can not get valid conneciton from mo, the following cases wil not be executed!"); + LOG.error("The mo-tester can not get valid conneciton from mo with[user="+userName+", pwd="+pwd+"], the following cases wil not be executed!"); server_up = false; return null; } @@ -95,7 +97,7 @@ public static Connection getConnectionForSys(){ if(!server_up) return null; //get db connection,if failed,retry 3 times 10 s interval - for(int i = 0; i < 3; i++) { + //for(int i = 0; i < 3; i++) { try { Class.forName(driver); if (sysconn == null || sysconn.isClosed()) { @@ -103,7 +105,7 @@ public static Connection getConnectionForSys(){ } return sysconn; } catch (SQLException e) { - LOG.error("The mo-tester can not get valid conneciton from mo with[user="+userName+", pwd="+pwd+"] for sys user, and will wait 10 seconds and retry..."); + //LOG.error("The mo-tester can not get valid conneciton from mo with[user="+userName+", pwd="+pwd+"] for sys user, and will wait 10 seconds and retry..."); try { Thread.sleep(10000); } catch (InterruptedException ex) { @@ -112,9 +114,9 @@ public static Connection getConnectionForSys(){ } catch (ClassNotFoundException e) { e.printStackTrace(); } - } + //} - LOG.error("The mo-tester still can not get valid conneciton from mo for sys user, the following cases wil not be executed!"); + LOG.error("The mo-tester can not get valid conneciton from mo with[user="+userName+", pwd="+pwd+"], the following cases wil not be executed!"); server_up = false; return null; }