This is an automated email from the ASF dual-hosted git repository.
qiaojialin pushed a commit to branch rel/0.10
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git
The following commit(s) were added to refs/heads/rel/0.10 by this push:
new 292414f [IOTDB-855] Put back SessionPool resources if
RuntimeException occurs (#1671)
292414f is described below
commit 292414fad8939a3abf64fe1ccaeb03c40b3ccdab
Author: Haonan <[email protected]>
AuthorDate: Tue Sep 1 22:38:56 2020 +0800
[IOTDB-855] Put back SessionPool resources if RuntimeException occurs
(#1671)
---
.../org/apache/iotdb/session/pool/SessionPool.java | 24 +++++++++++-----------
1 file changed, 12 insertions(+), 12 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 920b2d4..475d60f 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
@@ -285,7 +285,7 @@ public class SessionPool {
} catch (IoTDBConnectionException e) {
// TException means the connection is broken, remove it and get a new
one.
cleanSessionAndMayThrowConnectionException(session, i, e);
- } catch (BatchExecutionException e) {
+ } catch (BatchExecutionException | RuntimeException e) {
putBack(session);
throw e;
}
@@ -319,7 +319,7 @@ public class SessionPool {
} catch (IoTDBConnectionException e) {
// TException means the connection is broken, remove it and get a new
one.
cleanSessionAndMayThrowConnectionException(session, i, e);
- } catch (BatchExecutionException e) {
+ } catch (BatchExecutionException | RuntimeException e) {
putBack(session);
throw e;
}
@@ -345,7 +345,7 @@ public class SessionPool {
} catch (IoTDBConnectionException e) {
// TException means the connection is broken, remove it and get a new
one.
cleanSessionAndMayThrowConnectionException(session, i, e);
- } catch (BatchExecutionException e) {
+ } catch (BatchExecutionException | RuntimeException e) {
putBack(session);
throw e;
}
@@ -372,7 +372,7 @@ public class SessionPool {
} catch (IoTDBConnectionException e) {
// TException means the connection is broken, remove it and get a new
one.
cleanSessionAndMayThrowConnectionException(session, i, e);
- } catch (BatchExecutionException e) {
+ } catch (BatchExecutionException | RuntimeException e) {
putBack(session);
throw e;
}
@@ -398,7 +398,7 @@ public class SessionPool {
} catch (IoTDBConnectionException e) {
// TException means the connection is broken, remove it and get a new
one.
cleanSessionAndMayThrowConnectionException(session, i, e);
- } catch (StatementExecutionException e) {
+ } catch (StatementExecutionException | RuntimeException e) {
putBack(session);
throw e;
}
@@ -424,7 +424,7 @@ public class SessionPool {
} catch (IoTDBConnectionException e) {
// TException means the connection is broken, remove it and get a new
one.
cleanSessionAndMayThrowConnectionException(session, i, e);
- } catch (StatementExecutionException e) {
+ } catch (StatementExecutionException | RuntimeException e) {
putBack(session);
throw e;
}
@@ -446,7 +446,7 @@ public class SessionPool {
} catch (IoTDBConnectionException e) {
// TException means the connection is broken, remove it and get a new
one.
cleanSessionAndMayThrowConnectionException(session, i, e);
- } catch (BatchExecutionException e) {
+ } catch (BatchExecutionException | RuntimeException e) {
putBack(session);
throw e;
}
@@ -468,7 +468,7 @@ public class SessionPool {
} catch (IoTDBConnectionException e) {
// TException means the connection is broken, remove it and get a new
one.
cleanSessionAndMayThrowConnectionException(session, i, e);
- } catch (BatchExecutionException e) {
+ } catch (BatchExecutionException | RuntimeException e) {
putBack(session);
throw e;
}
@@ -491,7 +491,7 @@ public class SessionPool {
} catch (IoTDBConnectionException e) {
// TException means the connection is broken, remove it and get a new
one.
cleanSessionAndMayThrowConnectionException(session, i, e);
- } catch (BatchExecutionException e) {
+ } catch (BatchExecutionException | RuntimeException e) {
putBack(session);
throw e;
}
@@ -515,7 +515,7 @@ public class SessionPool {
} catch (IoTDBConnectionException e) {
// TException means the connection is broken, remove it and get a new
one.
cleanSessionAndMayThrowConnectionException(session, i, e);
- } catch (BatchExecutionException e) {
+ } catch (BatchExecutionException | RuntimeException e) {
putBack(session);
throw e;
}
@@ -537,7 +537,7 @@ public class SessionPool {
} catch (IoTDBConnectionException e) {
// TException means the connection is broken, remove it and get a new
one.
cleanSessionAndMayThrowConnectionException(session, i, e);
- } catch (StatementExecutionException e) {
+ } catch (StatementExecutionException | RuntimeException e) {
putBack(session);
throw e;
}
@@ -559,7 +559,7 @@ public class SessionPool {
} catch (IoTDBConnectionException e) {
// TException means the connection is broken, remove it and get a new
one.
cleanSessionAndMayThrowConnectionException(session, i, e);
- } catch (StatementExecutionException e) {
+ } catch (StatementExecutionException | RuntimeException e) {
putBack(session);
throw e;
}