You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "ifesdjeen (via GitHub)" <gi...@apache.org> on 2026/01/12 10:52:13 UTC

Re: [PR] Invalidate the Prepared statement cache only if either of the prepare… [cassandra]

ifesdjeen commented on code in PR #4542:
URL: https://github.com/apache/cassandra/pull/4542#discussion_r2681743250


##########
src/java/org/apache/cassandra/cql3/QueryProcessor.java:
##########
@@ -649,8 +649,10 @@ public ResultMessage.Prepared prepare(String queryString, ClientState clientStat
                 return createResultMessage(hashWithKeyspace, cachedWithKeyspace);
             }
         }
-        else
+        else if (cachedWithoutKeyspace != null || cachedWithKeyspace != null)

Review Comment:
   I think we need something like `else if ((cachedWithoutKeyspace != null) != (cachedWithKeyspace != null))`, to make sure _at least one_ of them is in cache.



-- 
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: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org