tolbertam commented on code in PR #3917: URL: https://github.com/apache/cassandra/pull/3917#discussion_r2035566355
########## src/java/org/apache/cassandra/cql3/QueryProcessor.java: ########## @@ -155,6 +155,12 @@ private enum InternalStateInstance } public void preloadPreparedStatements() + { + preloadPreparedStatements(5000); Review Comment: :+1: agreed, especially since its used in multiple places. I'll introduce a constant. One thing we've learned since deploying this is that paging does prevent OOMing Cassandra on start up, but the fact that in some cases we preload millions of leaked statements, it can defer startup almost indefinitely. To get around that we've truncated the prepared_statements table, but have only had to do that in like 2 or 3 out of hundreds of clusters. I've considered capping the number of statements read and then perhaps truncating the table after, but that feels somewhat wrong to do, especially since the leaking statement issue should go away after this fix, and given this bug has been present for a long time (but exacerbated by the caffeine library change in 4.1+), it didn't feel right to do that. I think I'll add a warning after ~100k rows are read and leave it at that. -- 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-unsubscr...@cassandra.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org For additional commands, e-mail: pr-h...@cassandra.apache.org