smiklosovic commented on code in PR #4596:
URL: https://github.com/apache/cassandra/pull/4596#discussion_r2772132626


##########
src/java/org/apache/cassandra/db/guardrails/Guardrails.java:
##########
@@ -613,6 +616,19 @@ public final class Guardrails implements GuardrailsMBean
                      format("The keyspace %s has a replication factor of %s, 
above the %s threshold of %s.",
                             what, value, isWarning ? "warning" : "failure", 
threshold));
 
+    /**
+     * Prevents heap exhaustion caused by the anti-pattern of preparing 
queries with
+     * hardcoded literals instead of bind markers. This prevents filling the 
statement cache with non-reusable entries.
+     *
+     * @see <a 
href="https://issues.apache.org/jira/browse/CASSANDRA-21139";>CASSANDRA-21139</a>
+     */
+
+    public static final EnableFlag mispreparedStatementsEnabled =
+    new EnableFlag("misprepared_statements_enabled",
+                   "Mis-prepared statements cause server-side memory 
exhaustion and high GC pressure by flooding the statement cache with 
non-reusable query entries",

Review Comment:
   be consistent over the patch, Mis-prepared or misprepared? 



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

Reply via email to