jaydeepkumar1984 commented on code in PR #4542:
URL: https://github.com/apache/cassandra/pull/4542#discussion_r2688252159
##########
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:
Let me elaborate.
`boolean safeToReturnCached = cachedWithoutKeyspace != null &&
cachedWithKeyspace != null;`
We are in the else block because `safeToReturnCached` is `false`. If
`safeToReturnCached` is `false`, that means either `cachedWithoutKeyspace` is
`null` or `cachedWithKeyspace` is `null` or both of them.
So, at this place, `if (cachedWithoutKeyspace != null || cachedWithKeyspace
!= null)` is sufficient.
Could you please double-check?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]