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


##########
src/java/org/apache/cassandra/cql3/QueryProcessor.java:
##########
@@ -149,11 +153,13 @@ public void preloadPreparedStatements()
                     clientState.setKeyspace(keyspace);
 
                 Prepared prepared = parseAndPrepare(query, clientState, false);
-                preparedStatements.put(id, prepared);
+                int precomputedCacheEntrySize = 
measurePStatementCacheEntrySize(id, prepared);
+                Pair<Prepared, Integer> cacheValue = Pair.create(prepared, 
precomputedCacheEntrySize);
+                preparedStatements.put(id, cacheValue);
 
                 // Preload `null` statement for non-fully qualified 
statements, since it can't be parsed if loaded from cache and will be dropped
                 if (!prepared.fullyQualified)
-                    preparedStatements.get(computeId(query, null), (ignored_) 
-> prepared);
+                    preparedStatements.get(computeId(query, null), (ignored_) 
-> cacheValue);

Review Comment:
   I don't understand what is that underscore in `ignored_` good for.



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