Details
-
Improvement
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
-
Performance
-
Normal
-
All
-
None
-
Description
Currently prepared statements size are computed twice which is duplicate effort:
- https://github.com/apache/cassandra/blob/cassandra-4.0/src/java/org/apache/cassandra/cql3/QueryProcessor.java#L672
- https://github.com/apache/cassandra/blob/cassandra-4.0/src/java/org/apache/cassandra/cql3/QueryProcessor.java#L802
But we also get the side effect of that 'slow' computation locking the underlying ConcurrentHashMap. We've had nodes becoming unresponsively slow for hours with hundreds of threads in jstack all queued up behind computeIfAbsent operations on cache insertion/eviction collisions.
Computing size only once and pulling that value instead of recomputing it on cache insertion was the solution
Attachments
Attachments
Issue Links
- causes
-
CASSANDRA-20055 Flaky PstmtPersistenceTest
- Open
- links to