stankiewicz commented on code in PR #39803:
URL: https://github.com/apache/beam/pull/39803#discussion_r3810994312


##########
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:
   apologies, you are correct, getSession should be synchronized in such 
change. Sharan, can you apply fix to master as well?



-- 
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