This is an automated email from the ASF dual-hosted git repository. xuekaifeng pushed a commit to branch fix-session-put-back-master in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 0fa7c6fbad8a6407a0969f344b3c443e86d8706d Author: 151250176 <[email protected]> AuthorDate: Fri Jan 22 15:31:28 2021 +0800 fix bug --- .../org/apache/iotdb/session/pool/SessionPool.java | 34 +++++++++++----------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/session/src/main/java/org/apache/iotdb/session/pool/SessionPool.java b/session/src/main/java/org/apache/iotdb/session/pool/SessionPool.java index 43af349..f4c1cc1 100644 --- a/session/src/main/java/org/apache/iotdb/session/pool/SessionPool.java +++ b/session/src/main/java/org/apache/iotdb/session/pool/SessionPool.java @@ -555,7 +555,7 @@ public class SessionPool { // TException means the connection is broken, remove it and get a new one. logger.warn("insertRecord failed", e); cleanSessionAndMayThrowConnectionException(session, i, e); - } catch (StatementExecutionException e) { + } catch (StatementExecutionException | RuntimeException e) { putBack(session); throw e; } @@ -673,7 +673,7 @@ public class SessionPool { // TException means the connection is broken, remove it and get a new one. logger.warn("testInsertRecord failed", e); cleanSessionAndMayThrowConnectionException(session, i, e); - } catch (StatementExecutionException e) { + } catch (StatementExecutionException | RuntimeException e) { putBack(session); throw e; } @@ -721,7 +721,7 @@ public class SessionPool { // TException means the connection is broken, remove it and get a new one. logger.warn("deleteTimeseries failed", e); cleanSessionAndMayThrowConnectionException(session, i, e); - } catch (StatementExecutionException e) { + } catch (StatementExecutionException | RuntimeException e) { putBack(session); throw e; } @@ -745,7 +745,7 @@ public class SessionPool { // TException means the connection is broken, remove it and get a new one. logger.warn("deleteTimeseries failed", e); cleanSessionAndMayThrowConnectionException(session, i, e); - } catch (StatementExecutionException e) { + } catch (StatementExecutionException | RuntimeException e) { putBack(session); throw e; } @@ -770,7 +770,7 @@ public class SessionPool { // TException means the connection is broken, remove it and get a new one. logger.warn("deleteData failed", e); cleanSessionAndMayThrowConnectionException(session, i, e); - } catch (StatementExecutionException e) { + } catch (StatementExecutionException | RuntimeException e) { putBack(session); throw e; } @@ -795,7 +795,7 @@ public class SessionPool { // TException means the connection is broken, remove it and get a new one. logger.warn("deleteData failed", e); cleanSessionAndMayThrowConnectionException(session, i, e); - } catch (StatementExecutionException e) { + } catch (StatementExecutionException | RuntimeException e) { putBack(session); throw e; } @@ -821,7 +821,7 @@ public class SessionPool { // TException means the connection is broken, remove it and get a new one. logger.warn("deleteData failed", e); cleanSessionAndMayThrowConnectionException(session, i, e); - } catch (StatementExecutionException e) { + } catch (StatementExecutionException | RuntimeException e) { putBack(session); throw e; } @@ -840,7 +840,7 @@ public class SessionPool { // TException means the connection is broken, remove it and get a new one. logger.warn("setStorageGroup failed", e); cleanSessionAndMayThrowConnectionException(session, i, e); - } catch (StatementExecutionException e) { + } catch (StatementExecutionException | RuntimeException e) { putBack(session); throw e; } @@ -859,7 +859,7 @@ public class SessionPool { // TException means the connection is broken, remove it and get a new one. logger.warn("deleteStorageGroup failed", e); cleanSessionAndMayThrowConnectionException(session, i, e); - } catch (StatementExecutionException e) { + } catch (StatementExecutionException | RuntimeException e) { putBack(session); throw e; } @@ -878,7 +878,7 @@ public class SessionPool { // TException means the connection is broken, remove it and get a new one. logger.warn("deleteStorageGroups failed", e); cleanSessionAndMayThrowConnectionException(session, i, e); - } catch (StatementExecutionException e) { + } catch (StatementExecutionException | RuntimeException e) { putBack(session); throw e; } @@ -897,7 +897,7 @@ public class SessionPool { // TException means the connection is broken, remove it and get a new one. logger.warn("createTimeseries failed", e); cleanSessionAndMayThrowConnectionException(session, i, e); - } catch (StatementExecutionException e) { + } catch (StatementExecutionException | RuntimeException e) { putBack(session); throw e; } @@ -919,7 +919,7 @@ public class SessionPool { // TException means the connection is broken, remove it and get a new one. logger.warn("createTimeseries failed", e); cleanSessionAndMayThrowConnectionException(session, i, e); - } catch (StatementExecutionException e) { + } catch (StatementExecutionException | RuntimeException e) { putBack(session); throw e; } @@ -942,7 +942,7 @@ public class SessionPool { // TException means the connection is broken, remove it and get a new one. logger.warn("createMultiTimeseries failed", e); cleanSessionAndMayThrowConnectionException(session, i, e); - } catch (StatementExecutionException e) { + } catch (StatementExecutionException | RuntimeException e) { putBack(session); throw e; } @@ -961,7 +961,7 @@ public class SessionPool { // TException means the connection is broken, remove it and get a new one. logger.warn("checkTimeseriesExists failed", e); cleanSessionAndMayThrowConnectionException(session, i, e); - } catch (StatementExecutionException e) { + } catch (StatementExecutionException | RuntimeException e) { putBack(session); throw e; } @@ -992,7 +992,7 @@ public class SessionPool { // TException means the connection is broken, remove it and get a new one. logger.warn("executeQueryStatement failed", e); cleanSessionAndMayThrowConnectionException(session, i, e); - } catch (StatementExecutionException e) { + } catch (StatementExecutionException | RuntimeException e) { putBack(session); throw e; } @@ -1018,7 +1018,7 @@ public class SessionPool { // TException means the connection is broken, remove it and get a new one. logger.warn("executeNonQueryStatement failed", e); cleanSessionAndMayThrowConnectionException(session, i, e); - } catch (StatementExecutionException e) { + } catch (StatementExecutionException | RuntimeException e) { putBack(session); throw e; } @@ -1038,7 +1038,7 @@ public class SessionPool { // TException means the connection is broken, remove it and get a new one. logger.warn("executeRawDataQuery failed", e); cleanSessionAndMayThrowConnectionException(session, i, e); - } catch (StatementExecutionException e) { + } catch (StatementExecutionException | RuntimeException e) { putBack(session); throw e; }
