sharan-malyala commented on code in PR #39803:
URL: https://github.com/apache/beam/pull/39803#discussion_r3805727793


##########
sdks/java/io/cassandra/src/main/java/org/apache/beam/sdk/io/cassandra/ConnectionManager.java:
##########
@@ -59,9 +59,22 @@ private static String readToSessionHash(Read<?> read) {
   }
 
   static Session getSession(Read<?> read) {
+    String clusterHash = readToClusterHash(read);
+    String sessionHash = readToSessionHash(read);
+
+    Cluster cachedCluster = clusterMap.get(clusterHash);
+
+    if (cachedCluster != null && cachedCluster.isClosed()) {

Review Comment:
   If we dont cleanup the session and just re-create cluster object, the broken 
session will be returned and used by the work items leading to failure.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to