You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ha...@apache.org on 2023/01/03 06:37:02 UTC
[iotdb] branch rel/0.13 updated: IOTDB-5296:fix close session npe when session is null (#8626)
This is an automated email from the ASF dual-hosted git repository.
haonan pushed a commit to branch rel/0.13
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/rel/0.13 by this push:
new 6ff1ad4c3a IOTDB-5296:fix close session npe when session is null (#8626)
6ff1ad4c3a is described below
commit 6ff1ad4c3a8c4ed34bacf6ee913b3bbbf73234f3
Author: Pengfei Liu <46...@users.noreply.github.com>
AuthorDate: Tue Jan 3 14:36:56 2023 +0800
IOTDB-5296:fix close session npe when session is null (#8626)
---
.../main/java/org/apache/iotdb/db/query/control/SessionManager.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/server/src/main/java/org/apache/iotdb/db/query/control/SessionManager.java b/server/src/main/java/org/apache/iotdb/db/query/control/SessionManager.java
index 5fd4dfbd2a..b1a720d206 100644
--- a/server/src/main/java/org/apache/iotdb/db/query/control/SessionManager.java
+++ b/server/src/main/java/org/apache/iotdb/db/query/control/SessionManager.java
@@ -160,6 +160,11 @@ public class SessionManager implements SessionManagerMBean {
* @return true if releasing successfully, false otherwise (e.g., the session does not exist)
*/
public boolean releaseSessionResource(IClientSession session) {
+
+ if (session == null) {
+ LOGGER.error("Error occurred while releasing session resource: session is null");
+ return false;
+ }
Set<Long> statementIdSet = session.getStatementIds();
if (statementIdSet != null) {
for (Long statementId : statementIdSet) {