CASSANDRA-14366: Add try-catch block for missing prepared statement

This commit is contained in:
Arvind Kandpal 2026-07-28 11:55:04 +05:30
parent a5569da3c9
commit 3540e2463f
1 changed files with 15 additions and 7 deletions

View File

@ -120,13 +120,21 @@ public class Info extends AbstractCommand
cacheService.getCounterCacheSavePeriodInSeconds());
// Prepared Statement Cache: entries, size, capacity, executions, evictions
out.printf("%-23s: entries %d, size %s, capacity %s, %d executions, %d evictions%n",
"Prepared Stmt Cache",
probe.getCQLMetric("PreparedStatementsCount"),
FileUtils.stringifyFileSize((long) probe.getCQLMetric("PreparedStatementsCacheSize")),
FileUtils.stringifyFileSize((long) probe.getCQLMetric("PreparedStatementsCacheCapacity")),
probe.getCQLMetric("PreparedStatementsExecuted"),
probe.getCQLMetric("PreparedStatementsEvicted"));
try
{
out.printf("%-23s: entries %d, size %s, capacity %s, %d executions, %d evictions%n",
"Prepared Stmt Cache",
probe.getCQLMetric("PreparedStatementsCount"),
FileUtils.stringifyFileSize((long) probe.getCQLMetric("PreparedStatementsCacheSize")),
FileUtils.stringifyFileSize((long) probe.getCQLMetric("PreparedStatementsCacheCapacity")),
probe.getCQLMetric("PreparedStatementsExecuted"),
probe.getCQLMetric("PreparedStatementsEvicted"));
}
catch (RuntimeException e)
{
if (!(e.getCause() instanceof InstanceNotFoundException))
throw e;
}
// Chunk Cache: Hits, Requests, RecentHitRate, SavePeriodInSeconds
try