smiklosovic commented on code in PR #4596:
URL: https://github.com/apache/cassandra/pull/4596#discussion_r2749177750
##########
src/java/org/apache/cassandra/cql3/QueryProcessor.java:
##########
@@ -513,6 +522,62 @@ public static Prepared parseAndPrepare(String query,
ClientState clientState, bo
return res;
}
+ private static void checkMispreparedGuardrail(CQLStatement statement,
ClientState clientState)
+ {
+ if (clientState.isInternal)
+ {
+ return;
+ }
+
+ if (isMisprepared(statement))
Review Comment:
can you make this logic faster? If it is indeed prepared then you are
evaluating it unnecessarily which would slow it down. What is the least amount
of test to do to run through that "heavy" logic? It is the fact whether our
guardrail is enabled in the first place, right? So base the logic on guardrail
evaluation first and then we will check if it is all prepared or not - the
heavy logic done only when must.
If you are not sure which approach is faster then run a stress test and
profile it with async profiler.
--
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]