dcapwell commented on code in PR #3305:
URL: https://github.com/apache/cassandra/pull/3305#discussion_r1613959028
##########
src/java/org/apache/cassandra/db/virtual/AccordVirtualTables.java:
##########
@@ -18,57 +18,162 @@
package org.apache.cassandra.db.virtual;
-import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.concurrent.TimeUnit;
-import com.google.common.annotations.VisibleForTesting;
-
+import accord.local.CommandStores;
+import accord.primitives.TxnId;
+import accord.utils.async.AsyncChains;
import org.apache.cassandra.config.DatabaseDescriptor;
import org.apache.cassandra.cql3.statements.schema.CreateTableStatement;
+import org.apache.cassandra.dht.Range;
+import org.apache.cassandra.dht.Token;
import org.apache.cassandra.schema.TableMetadata;
+import org.apache.cassandra.service.accord.AccordCommandStore;
import org.apache.cassandra.service.accord.AccordService;
-import org.apache.cassandra.service.accord.IAccordService;
+import org.apache.cassandra.service.accord.AccordStateCache;
+import
org.apache.cassandra.service.consensus.migration.ConsensusMigrationState;
+import org.apache.cassandra.service.consensus.migration.TableMigrationState;
+import org.apache.cassandra.tcm.ClusterMetadata;
+import org.apache.cassandra.utils.Clock;
+
+import static com.google.common.collect.ImmutableList.toImmutableList;
public class AccordVirtualTables
{
- private AccordVirtualTables()
- {
-
- }
+ private AccordVirtualTables() {}
public static Collection<VirtualTable> getAll(String keyspace)
{
if (!DatabaseDescriptor.getAccordTransactionsEnabled())
return Collections.emptyList();
- return Arrays.asList(
- new Epoch(keyspace)
+ return List.of(
+ new CommandStoreCache(keyspace),
+ new MigrationStates(keyspace),
+ new CoordinationStatus(keyspace)
);
}
- @VisibleForTesting
- public static final class Epoch extends AbstractVirtualTable
+ public static final class CommandStoreCache extends AbstractVirtualTable
{
+ private CommandStoreCache(String keyspace)
Review Comment:
the global one is def nice to have, but if you are trying to debug an issue
you kinda need to know which "instance" is having the issues... if command
cache is 99% cache hit and the global miss rate is 50%, you know something is
going on with the CFK caches (but which one?!?!)
The `system_metrics` vtables also expose the JMX metrics, which is the JVM
level (includes each store)
TL;DR - I personally feel that cmd/cfk cache level is more useful than
global and a global is nice but not required (slight duplicate with JMX table)
--
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]