From de71372fe5965a38f50e06c8088eff1d2708b63a Mon Sep 17 00:00:00 2001 From: yma Date: Mon, 21 Oct 2024 18:23:07 +0800 Subject: [PATCH] Reinit Cassandra client and session when session closed --- .../service/tracking/data/cassandra/CassandraTrackingQuery.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/commonjava/indy/service/tracking/data/cassandra/CassandraTrackingQuery.java b/src/main/java/org/commonjava/indy/service/tracking/data/cassandra/CassandraTrackingQuery.java index 72657bb..96754d3 100644 --- a/src/main/java/org/commonjava/indy/service/tracking/data/cassandra/CassandraTrackingQuery.java +++ b/src/main/java/org/commonjava/indy/service/tracking/data/cassandra/CassandraTrackingQuery.java @@ -137,7 +137,7 @@ private ResultSet executeSession ( BoundStatement bind ) ResultSet trackingRecord = null; try { - if ( session == null ) + if ( session == null || session.isClosed() ) { client.close(); client.init();