maedhroz commented on code in PR #3305:
URL: https://github.com/apache/cassandra/pull/3305#discussion_r1611868923
##########
src/java/org/apache/cassandra/db/virtual/AccordVirtualTables.java:
##########
@@ -73,6 +90,88 @@ public DataSet data()
}
}
+ public static final class CommandStoreCache extends AbstractVirtualTable
+ {
+ private CommandStoreCache(String keyspace)
+ {
+ super(parse(keyspace,
+ "Accord Command Store Cache Metrics",
+ "CREATE TABLE accord_command_store_cache(\n" +
+ " id int,\n" +
+ " queries bigint,\n" +
+ " hits bigint,\n" +
+ " misses bigint,\n" +
+ " PRIMARY KEY (id)" +
+ ')'));
+ }
+
+ @Override
+ public DataSet data()
+ {
+ AccordService accord = (AccordService) AccordService.instance();
+ SimpleDataSet result = new SimpleDataSet(metadata());
+
+ Map<Integer, AccordStateCache.ImmutableStats> statsByStore =
+ accord.node().commandStores().map(PreLoadContext.empty(),
+ store ->
((AccordCommandStore) store.commandStore()).cache().stats());
+
+ for (Map.Entry<Integer, AccordStateCache.ImmutableStats> stats :
statsByStore.entrySet())
+ {
+ result.row(stats.getKey());
+ result.column("queries", stats.getValue().queries);
+ result.column("hits", stats.getValue().hits);
+ result.column("misses", stats.getValue().misses);
+ }
+
+ return result;
+ }
+ }
+
+ public static final class MigrationStates extends AbstractVirtualTable
+ {
+ private MigrationStates(String keyspace)
+ {
+ super(parse(keyspace,
Review Comment:
Does a range move from "migrating" -> "migrated"?
--
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]