# Built-in Keyspaces and Tables (Apache Cassandra)

## Scope and sources
- Storage-backed system keyspaces covered: system, system_schema, system_auth, system_traces, system_distributed, system_cluster_metadata, system_accord.
- Virtual keyspaces covered: system_virtual_schema, system_views, system_metrics, system_accord_debug, system_accord_debug_remote.
- Source file: `src/java/org/apache/cassandra/schema/SchemaConstants.java`.
- Source file: `src/java/org/apache/cassandra/db/SystemKeyspace.java`.
- Source file: `src/java/org/apache/cassandra/schema/SchemaKeyspace.java`.
- Source file: `src/java/org/apache/cassandra/schema/SchemaKeyspaceTables.java`.
- Source file: `src/java/org/apache/cassandra/auth/AuthKeyspace.java`.
- Source file: `src/java/org/apache/cassandra/tracing/TraceKeyspace.java`.
- Source file: `src/java/org/apache/cassandra/schema/SystemDistributedKeyspace.java`.
- Source file: `src/java/org/apache/cassandra/schema/DistributedMetadataLogKeyspace.java`.
- Source file: `src/java/org/apache/cassandra/service/accord/AccordKeyspace.java`.
- Source file: `src/java/org/apache/cassandra/tcm/log/SystemKeyspaceStorage.java`.
- Source file: `src/java/org/apache/cassandra/service/CassandraDaemon.java` (virtual keyspace registration).
- Source file: `src/java/org/apache/cassandra/db/virtual/VirtualSchemaKeyspace.java`.
- Source file: `src/java/org/apache/cassandra/db/virtual/SystemViewsKeyspace.java`.
- Source file: `src/java/org/apache/cassandra/metrics/CassandraMetricsRegistry.java`.
- Source file: `src/java/org/apache/cassandra/db/virtual/TableMetricTables.java`.
- Source file: `src/java/org/apache/cassandra/db/virtual/LocalRepairTables.java`.
- Source file: `src/java/org/apache/cassandra/index/sai/virtual/StorageAttachedIndexTables.java`.
- Source file: `src/java/org/apache/cassandra/db/virtual/AccordDebugKeyspace.java`.
- Source file: `src/java/org/apache/cassandra/db/virtual/AccordDebugRemoteKeyspace.java`.
- Source file: `src/java/org/apache/cassandra/db/virtual/RemoteToLocalVirtualTable.java`.
- Source file: `src/java/org/apache/cassandra/db/virtual/CollectionVirtualTableAdapter.java`.
- Source file: `doc/modules/cassandra/pages/managing/operating/virtualtables.adoc`.

## system (local keyspace)
- Definition: `src/java/org/apache/cassandra/db/SystemKeyspace.java`.
- Defaults: gc_grace_seconds=0 and memtable_flush_period_in_ms=3600000 for all tables unless noted.
- Notes: legacy tables are retained for downgrade compatibility and marked as deprecated.

### system.batches
- Spec: Batchlog storage; partition key is id (timeuuid) and each row stores serialized mutations and the messaging version.
- CQL:
```sql
CREATE TABLE system.batches (
  id timeuuid,
  mutations list<blob>,
  version int,
  PRIMARY KEY ((id))
);
```
- Options: compaction = {'class': 'SizeTieredCompactionStrategy', 'min_threshold': '2'}; partitioner = LocalPartitioner(TimeUUIDType).
- Data flow: `BatchlogManager.store` writes, `BatchlogManager.remove` deletes, `BatchlogManager.replayFailedBatches` reads/replays.
- MySQL analog: none (closest to redo/binlog, but not a table).

### system.paxos
- Spec: Per-row Paxos state; partition key is row_key and clustering key is cf_id.
- CQL:
```sql
CREATE TABLE system.paxos (
  row_key blob,
  cf_id uuid,
  in_progress_ballot timeuuid,
  in_progress_read_ballot timeuuid,
  most_recent_commit blob,
  most_recent_commit_at timeuuid,
  most_recent_commit_version int,
  proposal blob,
  proposal_ballot timeuuid,
  proposal_version int,
  PRIMARY KEY ((row_key), cf_id)
);
```
- Options: compaction = {'class': 'LeveledCompactionStrategy'}; secondary indexes from `PaxosUncommittedIndex`.
- Data flow: `SystemKeyspace.loadPaxosState`, `SystemKeyspace.savePaxosWritePromise`, `SystemKeyspace.savePaxosReadPromise`, `SystemKeyspace.savePaxosProposal`, `SystemKeyspace.savePaxosCommit`, `PaxosStateTracker.rebuildUncommittedData`.
- MySQL analog: none.

### system.consensus_migration_state
- Spec: Tracks keys migrated to another consensus protocol; clustering order keeps newest epoch first.
- CQL:
```sql
CREATE TABLE system.consensus_migration_state (
  row_key blob,
  cf_id uuid,
  consensus_migrated_at_epoch bigint,
  consensus_max_hlc bigint,
  consensus_target tinyint,
  PRIMARY KEY ((row_key), cf_id, consensus_migrated_at_epoch)
) WITH CLUSTERING ORDER BY (cf_id ASC, consensus_migrated_at_epoch DESC);
```
- Options: compaction = {'class': 'TimeWindowCompactionStrategy', 'compaction_window_unit': 'MINUTES', 'compaction_window_size': '336'}; default_time_to_live=604800.
- Data flow: `SystemKeyspace.saveConsensusKeyMigrationState`, `SystemKeyspace.loadConsensusKeyMigrationState`.
- MySQL analog: none.

### system.paxos_repair_history
- Spec: Last successful paxos repairs by range for each keyspace/table.
- CQL:
```sql
CREATE TABLE system.paxos_repair_history (
  keyspace_name text,
  table_name text,
  points frozen<list<tuple<blob, timeuuid>>>,
  PRIMARY KEY (keyspace_name, table_name)
) WITH COMMENT = 'Last successful paxos repairs by range';
```
- Options: uses keyspace defaults.
- Data flow: `SystemKeyspace.savePaxosRepairHistory`, `SystemKeyspace.loadPaxosRepairHistory`, `SystemKeyspace.flushPaxosRepairHistory`.
- MySQL analog: none.

### system."IndexInfo"
- Spec: Secondary index build tracking; table_name holds the keyspace name.
- CQL:
```sql
CREATE TABLE system."IndexInfo" (
  table_name text,
  index_name text,
  value blob,
  PRIMARY KEY ((table_name), index_name)
);
```
- Options: uses keyspace defaults.
- Data flow: `SystemKeyspace.isIndexBuilt`, `SystemKeyspace.setIndexBuilt`, `SystemKeyspace.setIndexRemoved`, `SystemKeyspace.getBuiltIndexes`.
- MySQL analog: `information_schema.STATISTICS` (closest for index metadata, no build state).

### system.local
- Spec: Local node metadata; primary key is key (always 'local').
- CQL:
```sql
CREATE TABLE system.local (
  key text,
  bootstrapped text,
  broadcast_address inet,
  broadcast_port int,
  cluster_name text,
  cql_version text,
  data_center text,
  gossip_generation int,
  host_id uuid,
  listen_address inet,
  listen_port int,
  native_protocol_version text,
  partitioner text,
  rack text,
  release_version text,
  rpc_address inet,
  rpc_port int,
  schema_version uuid,
  tokens set<varchar>,
  truncated_at map<uuid, blob>,
  PRIMARY KEY ((key))
);
```
- Options: uses keyspace defaults; deprecated column `thrift_version` is recorded in metadata for compatibility.
- Data flow: `SystemKeyspace.persistLocalMetadata`, `SystemKeyspace.updateLocation`, `SystemKeyspace.updateRack`, `SystemKeyspace.updateSchemaVersion`, `SystemKeyspace.setBootstrapState`, `SystemKeyspace.setLocalHostId`, `SystemKeyspace.updateLocalTokens`, `SystemKeyspace.saveTruncationRecord`, `SystemKeyspace.removeTruncationRecord`.
- MySQL analog: `performance_schema.global_variables` and `performance_schema.global_status` (approx).

### system.peers_v2
- Spec: Peer node metadata keyed by (peer, peer_port).
- CQL:
```sql
CREATE TABLE system.peers_v2 (
  peer inet,
  peer_port int,
  data_center text,
  host_id uuid,
  preferred_ip inet,
  preferred_port int,
  rack text,
  release_version text,
  native_address inet,
  native_port int,
  schema_version uuid,
  tokens set<varchar>,
  PRIMARY KEY ((peer), peer_port)
);
```
- Options: uses keyspace defaults.
- Data flow: `SystemKeyspace.updateTokens`, `SystemKeyspace.updatePeerInfo`, `SystemKeyspace.updatePeerNativeAddress`, `SystemKeyspace.updatePreferredIP`, `SystemKeyspace.removeEndpoint`, `SystemKeyspace.peerEndpointStates`.
- MySQL analog: `performance_schema.replication_group_members` (approx).

### system.peer_events_v2
- Spec: Per-peer dropped hints.
- CQL:
```sql
CREATE TABLE system.peer_events_v2 (
  peer inet,
  peer_port int,
  hints_dropped map<timeuuid, int>,
  PRIMARY KEY ((peer), peer_port)
);
```
- Options: uses keyspace defaults.
- Data flow: `SystemKeyspace.updateHintsDropped`.
- MySQL analog: none.

### system.compaction_history
- Spec: Compaction history by compaction task id.
- CQL:
```sql
CREATE TABLE system.compaction_history (
  id timeuuid,
  bytes_in bigint,
  bytes_out bigint,
  columnfamily_name text,
  compacted_at timestamp,
  keyspace_name text,
  rows_merged map<int, bigint>,
  compaction_properties frozen<map<text, text>>,
  PRIMARY KEY ((id))
);
```
- Options: default_time_to_live=604800.
- Data flow: `SystemKeyspace.updateCompactionHistory` (called from `CompactionTask`).
- MySQL analog: none.

### system.sstable_activity_v2
- Spec: SSTable read rate metrics keyed by (keyspace_name, table_name, id).
- CQL:
```sql
CREATE TABLE system.sstable_activity_v2 (
  keyspace_name text,
  table_name text,
  id text,
  rate_120m double,
  rate_15m double,
  PRIMARY KEY ((keyspace_name, table_name, id))
);
```
- Options: uses keyspace defaults.
- Data flow: `SystemKeyspace.getSSTableReadMeter`, `SystemKeyspace.persistSSTableReadMeter`, `SystemKeyspace.clearSSTableReadMeter` (used by `SSTableReader`).
- MySQL analog: `performance_schema.table_io_waits_summary_by_table` (approx).

### system.table_estimates
- Spec: Range size estimates; range_type values include "primary" and "local_primary".
- CQL:
```sql
CREATE TABLE system.table_estimates (
  keyspace_name text,
  table_name text,
  range_type text,
  range_start text,
  range_end text,
  mean_partition_size bigint,
  partitions_count bigint,
  PRIMARY KEY ((keyspace_name), table_name, range_type, range_start, range_end)
);
```
- Options: uses keyspace defaults.
- Data flow: `SystemKeyspace.updateTableEstimates`, `SystemKeyspace.clearEstimates`, `SystemKeyspace.clearAllEstimates` (scheduled from `CassandraDaemon`).
- MySQL analog: `information_schema.TABLES` (approx for row/data size estimates).

### system.available_ranges_v2
- Spec: Ranges available for serving during bootstrap/replace.
- CQL:
```sql
CREATE TABLE system.available_ranges_v2 (
  keyspace_name text,
  full_ranges set<blob>,
  transient_ranges set<blob>,
  PRIMARY KEY ((keyspace_name))
);
```
- Options: uses keyspace defaults.
- Data flow: `SystemKeyspace.updateAvailableRanges`, `SystemKeyspace.getAvailableRanges`, `SystemKeyspace.resetAvailableStreamedRangesForKeyspace` (invoked from `RangeStreamer`).
- MySQL analog: none.

### system.transferred_ranges_v2
- Spec: Transferred ranges per streaming operation and peer.
- CQL:
```sql
CREATE TABLE system.transferred_ranges_v2 (
  operation text,
  peer inet,
  peer_port int,
  keyspace_name text,
  ranges set<blob>,
  PRIMARY KEY ((operation, keyspace_name), peer, peer_port)
);
```
- Options: uses keyspace defaults.
- Data flow: `SystemKeyspace.updateTransferredRanges`, `SystemKeyspace.getTransferredRanges`.
- MySQL analog: none.

### system.view_builds_in_progress
- Spec: Materialized view build progress per token range.
- CQL:
```sql
CREATE TABLE system.view_builds_in_progress (
  keyspace_name text,
  view_name text,
  start_token varchar,
  end_token varchar,
  last_token varchar,
  keys_built bigint,
  PRIMARY KEY ((keyspace_name), view_name, start_token, end_token)
);
```
- Options: uses keyspace defaults.
- Data flow: `SystemKeyspace.setViewBuildStatus`, `SystemKeyspace.getViewBuildStatus`, `SystemKeyspace.setViewBuilt` (clears ranges on completion).
- MySQL analog: none (no materialized views).

### system.built_views
- Spec: Built materialized views and replication of build status.
- CQL:
```sql
CREATE TABLE system.built_views (
  keyspace_name text,
  view_name text,
  status_replicated boolean,
  PRIMARY KEY ((keyspace_name), view_name)
);
```
- Options: uses keyspace defaults.
- Data flow: `SystemKeyspace.isViewBuilt`, `SystemKeyspace.setViewBuilt`, `SystemKeyspace.setViewRemoved`, `SystemKeyspace.isViewStatusReplicated`, `SystemKeyspace.setViewStatusReplicated`.
- MySQL analog: none.

### system.prepared_statements
- Spec: Cached prepared statements keyed by prepared_id.
- CQL:
```sql
CREATE TABLE system.prepared_statements (
  prepared_id blob,
  logged_keyspace text,
  query_string text,
  PRIMARY KEY ((prepared_id))
);
```
- Options: uses keyspace defaults.
- Data flow: `QueryProcessor.writePreparedStatement`, `SystemKeyspace.loadPreparedStatements`, `SystemKeyspace.removePreparedStatement`, `SystemKeyspace.resetPreparedStatements`.
- MySQL analog: `performance_schema.prepared_statements_instances`.

### system.repairs
- Spec: Local consistent repair sessions.
- CQL:
```sql
CREATE TABLE system.repairs (
  parent_id timeuuid,
  started_at timestamp,
  last_update timestamp,
  repaired_at timestamp,
  state int,
  coordinator inet,
  coordinator_port int,
  participants set<inet>,
  participants_wp set<text>,
  ranges set<blob>,
  cfids set<uuid>,
  PRIMARY KEY (parent_id)
);
```
- Options: uses keyspace defaults.
- Data flow: `LocalSessions.start` loads; `LocalSessions.setStateAndSave` and `LocalSessions.deleteRow` update/remove rows.
- MySQL analog: none.

### system.top_partitions
- Spec: Top partitions list by type (reads, writes, etc).
- CQL:
```sql
CREATE TABLE system.top_partitions (
  keyspace_name text,
  table_name text,
  top_type text,
  top frozen<list<tuple<text, bigint>>>,
  last_update timestamp,
  PRIMARY KEY (keyspace_name, table_name, top_type)
);
```
- Options: uses keyspace defaults.
- Data flow: `SystemKeyspace.saveTopPartitions`, `SystemKeyspace.getTopPartitions` (used by `TopPartitionTracker`).
- MySQL analog: none.

### system.local_metadata_log
- Spec: Local cluster metadata log (TCM) keyed by epoch.
- CQL:
```sql
CREATE TABLE system.local_metadata_log (
  epoch bigint,
  entry_id bigint,
  transformation blob,
  kind int,
  PRIMARY KEY (epoch)
);
```
- Options: compaction = {'class': 'TimeWindowCompactionStrategy', 'compaction_window_unit': 'DAYS', 'compaction_window_size': '1'}; partitioner = MetaStrategy.partitioner.
- Data flow: `SystemKeyspaceStorage.append`, `SystemKeyspaceStorage.getEntries`, `SystemKeyspaceStorage.truncate`.
- MySQL analog: none.

### system.metadata_snapshots
- Spec: ClusterMetadata snapshots keyed by epoch.
- CQL:
```sql
CREATE TABLE IF NOT EXISTS system.metadata_snapshots (
  epoch bigint PRIMARY KEY,
  snapshot blob
);
```
- Options: partitioner = MetaStrategy.partitioner.
- Data flow: `SystemKeyspace.storeSnapshot`, `SystemKeyspace.getSnapshot`, `SystemKeyspace.findSnapshotBefore`, `SystemKeyspace.findLastSnapshot`.
- MySQL analog: none.

### system.peers (deprecated)
- Spec: Legacy peer metadata without port; retained for downgrade.
- CQL:
```sql
CREATE TABLE system.peers (
  peer inet,
  data_center text,
  host_id uuid,
  preferred_ip inet,
  rack text,
  release_version text,
  rpc_address inet,
  schema_version uuid,
  tokens set<varchar>,
  PRIMARY KEY ((peer))
);
```
- Options: uses keyspace defaults.
- Data flow: `SystemKeyspace.updateTokens`, `SystemKeyspace.updatePeerInfo`, `SystemKeyspace.updatePeerNativeAddress`, `SystemKeyspace.updatePreferredIP`, `SystemKeyspace.removeEndpoint`.
- MySQL analog: `performance_schema.replication_group_members` (approx).

### system.peer_events (deprecated)
- Spec: Legacy dropped hints per peer.
- CQL:
```sql
CREATE TABLE system.peer_events (
  peer inet,
  hints_dropped map<timeuuid, int>,
  PRIMARY KEY ((peer))
);
```
- Options: uses keyspace defaults.
- Data flow: `SystemKeyspace.updateHintsDropped`.
- MySQL analog: none.

### system.transferred_ranges (deprecated)
- Spec: Legacy streaming ranges per operation and peer.
- CQL:
```sql
CREATE TABLE system.transferred_ranges (
  operation text,
  peer inet,
  keyspace_name text,
  ranges set<blob>,
  PRIMARY KEY ((operation, keyspace_name), peer)
);
```
- Options: uses keyspace defaults.
- Data flow: `SystemKeyspace.updateTransferredRanges`.
- MySQL analog: none.

### system.available_ranges (deprecated)
- Spec: Legacy available ranges for bootstrap/replace.
- CQL:
```sql
CREATE TABLE system.available_ranges (
  keyspace_name text,
  ranges set<blob>,
  PRIMARY KEY ((keyspace_name))
);
```
- Options: uses keyspace defaults.
- Data flow: `SystemKeyspace.updateAvailableRanges`.
- MySQL analog: none.

### system.size_estimates (deprecated)
- Spec: Legacy size estimates per token range.
- CQL:
```sql
CREATE TABLE system.size_estimates (
  keyspace_name text,
  table_name text,
  range_start text,
  range_end text,
  mean_partition_size bigint,
  partitions_count bigint,
  PRIMARY KEY ((keyspace_name), table_name, range_start, range_end)
);
```
- Options: uses keyspace defaults.
- Data flow: `SystemKeyspace.updateSizeEstimates`, `SystemKeyspace.clearEstimates`, `SystemKeyspace.clearAllEstimates`.
- MySQL analog: `information_schema.TABLES` (approx for size estimates).

### system.sstable_activity (deprecated)
- Spec: Legacy SSTable read rates keyed by generation.
- CQL:
```sql
CREATE TABLE system.sstable_activity (
  keyspace_name text,
  columnfamily_name text,
  generation int,
  rate_120m double,
  rate_15m double,
  PRIMARY KEY ((keyspace_name, columnfamily_name, generation))
);
```
- Options: uses keyspace defaults.
- Data flow: `SystemKeyspace.persistSSTableReadMeter`, `SystemKeyspace.clearSSTableReadMeter` for downgrade compatibility.
- MySQL analog: `performance_schema.table_io_waits_summary_by_table` (approx).

### system._paxos_repair_state (non-table)
- Spec: Filesystem directory used by `PaxosStateTracker`; this is not a CQL table.

## system_schema (local keyspace)
- Definition: `src/java/org/apache/cassandra/schema/SchemaKeyspace.java`.
- Defaults: gc_grace_seconds=604800 and memtable_flush_period_in_ms=3600000 for all tables unless noted.
- Notes: schema mutations are written by `SchemaKeyspace.convertSchemaDiffToMutations` and related helpers.

### system_schema.keyspaces
- Spec: Keyspace definitions.
- CQL:
```sql
CREATE TABLE system_schema.keyspaces (
  keyspace_name text,
  durable_writes boolean,
  replication frozen<map<text, text>>,
  fast_path frozen<map<text, text>>,
  PRIMARY KEY ((keyspace_name))
);
```
- Options: uses keyspace defaults.
- Data flow: `SchemaKeyspace.makeCreateKeyspaceMutation`, `SchemaKeyspace.makeDropKeyspaceMutation`, `SchemaKeyspace.saveSystemKeyspacesSchema`.
- MySQL analog: `information_schema.SCHEMATA`.

### system_schema.tables
- Spec: Table definitions and table options.
- CQL:
```sql
CREATE TABLE system_schema.tables (
  keyspace_name text,
  table_name text,
  allow_auto_snapshot boolean,
  bloom_filter_fp_chance double,
  caching frozen<map<text, text>>,
  comment text,
  compaction frozen<map<text, text>>,
  compression frozen<map<text, text>>,
  memtable text,
  crc_check_chance double,
  dclocal_read_repair_chance double,
  default_time_to_live int,
  extensions frozen<map<text, blob>>,
  flags frozen<set<text>>,
  gc_grace_seconds int,
  incremental_backups boolean,
  id uuid,
  max_index_interval int,
  memtable_flush_period_in_ms int,
  min_index_interval int,
  read_repair_chance double,
  speculative_retry text,
  additional_write_policy text,
  cdc boolean,
  read_repair text,
  fast_path frozen<map<text, text>>,
  auto_repair frozen<map<text, text>>,
  PRIMARY KEY ((keyspace_name), table_name)
);
```
- Options: uses keyspace defaults.
- Data flow: `SchemaKeyspace.addTableToSchemaMutation`, `SchemaKeyspace.addAlterTableToSchemaMutation`, `SchemaKeyspace.addDropTableToSchemaMutation`.
- MySQL analog: `information_schema.TABLES`.

### system_schema.columns
- Spec: Column definitions for tables and views.
- CQL:
```sql
CREATE TABLE system_schema.columns (
  keyspace_name text,
  table_name text,
  column_name text,
  clustering_order text,
  column_name_bytes blob,
  kind text,
  position int,
  type text,
  PRIMARY KEY ((keyspace_name), table_name, column_name)
);
```
- Options: uses keyspace defaults.
- Data flow: `SchemaKeyspace.addColumnToSchemaMutation`, `SchemaKeyspace.dropColumnFromSchemaMutation`.
- MySQL analog: `information_schema.COLUMNS`.

### system_schema.column_masks
- Spec: Dynamic data masking definitions per column.
- CQL:
```sql
CREATE TABLE system_schema.column_masks (
  keyspace_name text,
  table_name text,
  column_name text,
  function_keyspace text,
  function_name text,
  function_argument_types frozen<list<text>>,
  function_argument_values frozen<list<text>>,
  function_argument_nulls frozen<list<boolean>>,
  PRIMARY KEY ((keyspace_name), table_name, column_name)
);
```
- Options: uses keyspace defaults.
- Data flow: `SchemaKeyspace.addColumnToSchemaMutation` writes/clears masks alongside column mutations.
- MySQL analog: none.

### system_schema.dropped_columns
- Spec: Dropped column registry.
- CQL:
```sql
CREATE TABLE system_schema.dropped_columns (
  keyspace_name text,
  table_name text,
  column_name text,
  dropped_time timestamp,
  kind text,
  type text,
  PRIMARY KEY ((keyspace_name), table_name, column_name)
);
```
- Options: uses keyspace defaults.
- Data flow: `SchemaKeyspace.dropDroppedColumnFromSchemaMutation` during table/column drops.
- MySQL analog: none.

### system_schema.triggers
- Spec: Trigger definitions.
- CQL:
```sql
CREATE TABLE system_schema.triggers (
  keyspace_name text,
  table_name text,
  trigger_name text,
  options frozen<map<text, text>>,
  PRIMARY KEY ((keyspace_name), table_name, trigger_name)
);
```
- Options: uses keyspace defaults.
- Data flow: `SchemaKeyspace.addTriggerToSchemaMutation`, `SchemaKeyspace.dropTriggerFromSchemaMutation`.
- MySQL analog: `information_schema.TRIGGERS`.

### system_schema.views
- Spec: Materialized view definitions and view options.
- CQL:
```sql
CREATE TABLE system_schema.views (
  keyspace_name text,
  view_name text,
  base_table_id uuid,
  base_table_name text,
  where_clause text,
  allow_auto_snapshot boolean,
  bloom_filter_fp_chance double,
  caching frozen<map<text, text>>,
  comment text,
  compaction frozen<map<text, text>>,
  compression frozen<map<text, text>>,
  memtable text,
  crc_check_chance double,
  dclocal_read_repair_chance double,
  default_time_to_live int,
  extensions frozen<map<text, blob>>,
  gc_grace_seconds int,
  incremental_backups boolean,
  id uuid,
  include_all_columns boolean,
  max_index_interval int,
  memtable_flush_period_in_ms int,
  min_index_interval int,
  read_repair_chance double,
  speculative_retry text,
  additional_write_policy text,
  cdc boolean,
  read_repair text,
  auto_repair frozen<map<text, text>>,
  PRIMARY KEY ((keyspace_name), view_name)
);
```
- Options: uses keyspace defaults.
- Data flow: `SchemaKeyspace.addViewToSchemaMutation`, `SchemaKeyspace.addAlterViewToSchemaMutation`, `SchemaKeyspace.addDropViewToSchemaMutation`.
- MySQL analog: `information_schema.VIEWS` (approx; Cassandra views are materialized).

### system_schema.indexes
- Spec: Secondary index definitions.
- CQL:
```sql
CREATE TABLE system_schema.indexes (
  keyspace_name text,
  table_name text,
  index_name text,
  kind text,
  options frozen<map<text, text>>,
  PRIMARY KEY ((keyspace_name), table_name, index_name)
);
```
- Options: uses keyspace defaults.
- Data flow: `SchemaKeyspace.addIndexToSchemaMutation`, `SchemaKeyspace.dropIndexFromSchemaMutation`.
- MySQL analog: `information_schema.STATISTICS`.

### system_schema.types
- Spec: User-defined type definitions.
- CQL:
```sql
CREATE TABLE system_schema.types (
  keyspace_name text,
  type_name text,
  field_names frozen<list<text>>,
  field_types frozen<list<text>>,
  PRIMARY KEY ((keyspace_name), type_name)
);
```
- Options: uses keyspace defaults.
- Data flow: `SchemaKeyspace.addTypeToSchemaMutation`, `SchemaKeyspace.addDropTypeToSchemaMutation`.
- MySQL analog: none (no UDT catalog).

### system_schema.functions
- Spec: User-defined function definitions.
- CQL:
```sql
CREATE TABLE system_schema.functions (
  keyspace_name text,
  function_name text,
  argument_types frozen<list<text>>,
  argument_names frozen<list<text>>,
  body text,
  language text,
  return_type text,
  called_on_null_input boolean,
  PRIMARY KEY ((keyspace_name), function_name, argument_types)
);
```
- Options: uses keyspace defaults.
- Data flow: `SchemaKeyspace.addFunctionToSchemaMutation`, `SchemaKeyspace.addDropFunctionToSchemaMutation`.
- MySQL analog: `information_schema.ROUTINES` (FUNCTION rows).

### system_schema.aggregates
- Spec: User-defined aggregate definitions.
- CQL:
```sql
CREATE TABLE system_schema.aggregates (
  keyspace_name text,
  aggregate_name text,
  argument_types frozen<list<text>>,
  final_func text,
  initcond text,
  return_type text,
  state_func text,
  state_type text,
  PRIMARY KEY ((keyspace_name), aggregate_name, argument_types)
);
```
- Options: uses keyspace defaults.
- Data flow: `SchemaKeyspace.addAggregateToSchemaMutation`, `SchemaKeyspace.addDropAggregateToSchemaMutation`.
- MySQL analog: none (no UDA catalog).

## system_auth (replicated keyspace)
- Definition: `src/java/org/apache/cassandra/auth/AuthKeyspace.java`.
- Defaults: gc_grace_seconds=7776000 (90 days) for all tables unless noted.

### system_auth.roles
- Spec: Role definitions and login flags.
- CQL:
```sql
CREATE TABLE IF NOT EXISTS system_auth.roles (
  role text,
  is_superuser boolean,
  can_login boolean,
  salted_hash text,
  member_of set<text>,
  PRIMARY KEY (role)
);
```
- Options: uses keyspace defaults.
- Data flow: `CassandraRoleManager` creates/updates roles; `PasswordAuthenticator` and `MutualTlsAuthenticator` read for authentication.
- MySQL analog: `mysql.user` and `mysql.role_edges` (approx).

### system_auth.identity_to_role
- Spec: External identity mapping for mTLS or custom authenticators.
- CQL:
```sql
CREATE TABLE IF NOT EXISTS system_auth.identity_to_role (
  identity text,
  role text,
  PRIMARY KEY (identity)
);
```
- Options: uses keyspace defaults.
- Data flow: `CassandraRoleManager` maintains mappings during role grant/revoke.
- MySQL analog: none.

### system_auth.role_members
- Spec: Role membership lookup table.
- CQL:
```sql
CREATE TABLE IF NOT EXISTS system_auth.role_members (
  role text,
  member text,
  PRIMARY KEY (role, member)
);
```
- Options: uses keyspace defaults.
- Data flow: `CassandraRoleManager` updates membership on GRANT/REVOKE ROLE.
- MySQL analog: `mysql.role_edges`.

### system_auth.role_permissions
- Spec: Permissions granted to roles per resource.
- CQL:
```sql
CREATE TABLE IF NOT EXISTS system_auth.role_permissions (
  role text,
  resource text,
  permissions set<text>,
  PRIMARY KEY (role, resource)
);
```
- Options: uses keyspace defaults.
- Data flow: `CassandraAuthorizer` grants/revokes permissions.
- MySQL analog: `information_schema.*_privileges` or `mysql.user`/`mysql.db` (approx).

### system_auth.resource_role_permissons_index
- Spec: Reverse index of roles by resource for permission lookups.
- CQL:
```sql
CREATE TABLE IF NOT EXISTS system_auth.resource_role_permissons_index (
  resource text,
  role text,
  PRIMARY KEY (resource, role)
);
```
- Options: uses keyspace defaults.
- Data flow: `CassandraAuthorizer` maintains alongside role_permissions.
- MySQL analog: none (derived from privilege tables).

### system_auth.network_permissions
- Spec: Network permissions by role and DC list.
- CQL:
```sql
CREATE TABLE IF NOT EXISTS system_auth.network_permissions (
  role text,
  dcs frozen<set<text>>,
  PRIMARY KEY (role)
);
```
- Options: uses keyspace defaults.
- Data flow: `CassandraNetworkAuthorizer` updates entries for network authorizations.
- MySQL analog: host restrictions in `mysql.user` (approx).

### system_auth.cidr_permissions
- Spec: CIDR-group permissions per role.
- CQL:
```sql
CREATE TABLE system_auth.cidr_permissions (
  role text,
  cidr_groups frozen<set<text>>,
  PRIMARY KEY (role)
);
```
- Options: uses keyspace defaults.
- Data flow: `CIDRPermissionsManager` reads/writes for CIDR auth decisions.
- MySQL analog: none (host patterns are not CIDR-group based).

### system_auth.cidr_groups
- Spec: CIDR group to CIDR set mapping.
- CQL:
```sql
CREATE TABLE system_auth.cidr_groups (
  cidr_group text,
  cidrs frozen<set<tuple<inet, smallint>>>,
  PRIMARY KEY (cidr_group)
);
```
- Options: uses keyspace defaults.
- Data flow: `CIDRGroupsMappingManager` maintains group definitions.
- MySQL analog: none.

## system_traces (replicated keyspace)
- Definition: `src/java/org/apache/cassandra/tracing/TraceKeyspace.java`.
- Defaults: gc_grace_seconds=0 for all tables unless noted.

### system_traces.sessions
- Spec: Trace session metadata.
- CQL:
```sql
CREATE TABLE IF NOT EXISTS system_traces.sessions (
  session_id uuid,
  command text,
  client inet,
  coordinator inet,
  coordinator_port int,
  duration int,
  parameters map<text, text>,
  request text,
  started_at timestamp,
  PRIMARY KEY ((session_id))
);
```
- Options: uses keyspace defaults.
- Data flow: `TraceKeyspace.makeStartSessionMutation`, `TraceKeyspace.makeStopSessionMutation` (invoked via `Tracing`).
- MySQL analog: `performance_schema.events_statements_history_long` (approx).

### system_traces.events
- Spec: Per-session trace events.
- CQL:
```sql
CREATE TABLE IF NOT EXISTS system_traces.events (
  session_id uuid,
  event_id timeuuid,
  activity text,
  source inet,
  source_port int,
  source_elapsed int,
  thread text,
  PRIMARY KEY ((session_id), event_id)
);
```
- Options: uses keyspace defaults.
- Data flow: `TraceKeyspace.makeEventMutation` (invoked via `Tracing`).
- MySQL analog: `performance_schema.events_stages_history_long` (approx).

## system_distributed (replicated keyspace)
- Definition: `src/java/org/apache/cassandra/schema/SystemDistributedKeyspace.java`.
- Defaults: table-specific TTL/compaction for repair history; other tables use keyspace defaults.

### system_distributed.repair_history
- Spec: Repair history per table and repair id.
- CQL:
```sql
CREATE TABLE IF NOT EXISTS system_distributed.repair_history (
  keyspace_name text,
  columnfamily_name text,
  id timeuuid,
  parent_id timeuuid,
  range_begin text,
  range_end text,
  coordinator inet,
  coordinator_port int,
  participants set<inet>,
  participants_v2 set<text>,
  exception_message text,
  exception_stacktrace text,
  status text,
  started_at timestamp,
  finished_at timestamp,
  PRIMARY KEY ((keyspace_name, columnfamily_name), id)
);
```
- Options: default_time_to_live=2592000; compaction = {'class': 'TimeWindowCompactionStrategy', 'compaction_window_unit': 'DAYS', 'compaction_window_size': '1'}.
- Data flow: `SystemDistributedKeyspace.startRepairs`, `SystemDistributedKeyspace.successfulRepairJob`, `SystemDistributedKeyspace.failedRepairJob`.
- MySQL analog: none.

### system_distributed.parent_repair_history
- Spec: Parent repair summary per repair.
- CQL:
```sql
CREATE TABLE IF NOT EXISTS system_distributed.parent_repair_history (
  parent_id timeuuid,
  keyspace_name text,
  columnfamily_names set<text>,
  started_at timestamp,
  finished_at timestamp,
  exception_message text,
  exception_stacktrace text,
  requested_ranges set<text>,
  successful_ranges set<text>,
  options map<text, text>,
  PRIMARY KEY (parent_id)
);
```
- Options: default_time_to_live=2592000; compaction = {'class': 'TimeWindowCompactionStrategy', 'compaction_window_unit': 'DAYS', 'compaction_window_size': '1'}.
- Data flow: `SystemDistributedKeyspace.startParentRepair`, `SystemDistributedKeyspace.successfulParentRepair`, `SystemDistributedKeyspace.failParentRepair`.
- MySQL analog: none.

### system_distributed.view_build_status
- Spec: View build status per host.
- CQL:
```sql
CREATE TABLE IF NOT EXISTS system_distributed.view_build_status (
  keyspace_name text,
  view_name text,
  host_id uuid,
  status text,
  PRIMARY KEY ((keyspace_name, view_name), host_id)
);
```
- Options: uses keyspace defaults.
- Data flow: `SystemDistributedKeyspace.startViewBuild`, `SystemDistributedKeyspace.successfulViewBuild`, `SystemDistributedKeyspace.viewStatus`, `SystemDistributedKeyspace.setViewRemoved`.
- MySQL analog: none.

### system_distributed.partition_denylist
- Spec: Denylisted partition keys.
- CQL:
```sql
CREATE TABLE IF NOT EXISTS system_distributed.partition_denylist (
  ks_name text,
  table_name text,
  key blob,
  PRIMARY KEY ((ks_name, table_name), key)
);
```
- Options: uses keyspace defaults.
- Data flow: `PartitionDenylist` reads/writes and caches denylist entries.
- MySQL analog: none.

### system_distributed.auto_repair_history
- Spec: AutoRepair history per repair type and host.
- CQL:
```sql
CREATE TABLE IF NOT EXISTS system_distributed.auto_repair_history (
  host_id uuid,
  repair_type text,
  repair_turn text,
  repair_start_ts timestamp,
  repair_finish_ts timestamp,
  delete_hosts set<uuid>,
  delete_hosts_update_time timestamp,
  force_repair boolean,
  PRIMARY KEY (repair_type, host_id)
);
```
- Options: uses keyspace defaults.
- Data flow: `AutoRepairUtils` updates history during auto-repair scheduling.
- MySQL analog: none.

### system_distributed.auto_repair_priority
- Spec: AutoRepair priority ordering per repair type.
- CQL:
```sql
CREATE TABLE IF NOT EXISTS system_distributed.auto_repair_priority (
  repair_type text,
  repair_priority set<uuid>,
  PRIMARY KEY (repair_type)
);
```
- Options: uses keyspace defaults.
- Data flow: `AutoRepairUtils` updates and reads priorities.
- MySQL analog: none.

### system_distributed.compression_dictionaries
- Spec: Compression dictionaries for tables; newest dictionary has the highest dict_id.
- CQL:
```sql
CREATE TABLE IF NOT EXISTS system_distributed.compression_dictionaries (
  keyspace_name text,
  table_name text,
  kind text,
  dict_id bigint,
  dict blob,
  dict_length int,
  dict_checksum int,
  PRIMARY KEY ((keyspace_name, table_name), dict_id)
) WITH CLUSTERING ORDER BY (dict_id DESC);
```
- Options: uses keyspace defaults.
- Data flow: `SystemDistributedKeyspace.storeCompressionDictionary`, `SystemDistributedKeyspace.retrieveLatestCompressionDictionary`.
- MySQL analog: none.

## system_cluster_metadata (replicated keyspace)
- Definition: `src/java/org/apache/cassandra/schema/DistributedMetadataLogKeyspace.java`.

### system_cluster_metadata.distributed_metadata_log
- Spec: Distributed cluster metadata log keyed by epoch.
- CQL:
```sql
CREATE TABLE system_cluster_metadata.distributed_metadata_log (
  epoch bigint,
  entry_id bigint,
  transformation blob,
  kind int,
  PRIMARY KEY (epoch)
);
```
- Options: compaction = {'class': 'TimeWindowCompactionStrategy', 'compaction_window_unit': 'DAYS', 'compaction_window_size': '1'}; partitioner = MetaStrategy.partitioner.
- Data flow: `DistributedMetadataLogKeyspace.initialize`, `DistributedMetadataLogKeyspace.tryCommit`, `DistributedMetadataLogKeyspace.getLogState`.
- MySQL analog: none.

## system_accord (local keyspace)
- Definition: `src/java/org/apache/cassandra/service/accord/AccordKeyspace.java`.
- Notes: created only when Accord transactions are enabled (`Schema` includes it conditionally).

### system_accord.journal
- Spec: Accord journal with descriptor/offset clustering (newest first).
- CQL:
```sql
CREATE TABLE system_accord.journal (
  key blob,
  descriptor bigint,
  offset int,
  user_version int,
  record blob,
  PRIMARY KEY ((key), descriptor, offset)
) WITH CLUSTERING ORDER BY (descriptor DESC, offset DESC);
```
- Options: compression = {'class': 'NoopCompressor'}; compaction = {'class': 'LeveledCompactionStrategy'}; bloom_filter_fp_chance=0.01; partitioner = LocalPartitioner(BytesType). A custom index named "record" is added via `RouteJournalIndex`.
- Data flow: `AccordJournal` appends and reads entries; `AccordJournalTable` and `AbstractAccordSegmentCompactor` write during compaction.
- MySQL analog: none.

### system_accord.commands_for_key
- Spec: Per-key serialized command sets for Accord.
- CQL:
```sql
CREATE TABLE system_accord.commands_for_key (
  key blob,
  data blob,
  PRIMARY KEY (key)
) WITH compression = {'class': 'NoopCompressor'};
```
- Options: compaction = {'class': 'LeveledCompactionStrategy'}; bloom_filter_fp_chance=0.01; partitioner = LocalPartitioner(BytesType).
- Data flow: `AccordCommandStore` and `AccordKeyspace.CommandsForKeyAccessor` read/write serialized command sets.
- MySQL analog: none.

## system_virtual_schema (virtual keyspace)
- Definition: `src/java/org/apache/cassandra/db/virtual/VirtualSchemaKeyspace.java`.
- Notes: virtual keyspaces are node-local (non-replicated), have no SSTables, and use `LocalPartitioner`. DDL is not allowed; most tables are read-only. Consistency level is ignored and `ALLOW FILTERING` is implicitly permitted.
- Data flow: `VirtualSchemaKeyspace` reads from `VirtualKeyspaceRegistry.instance.virtualKeyspacesMetadata()`.

### system_virtual_schema.keyspaces
- Spec: Virtual keyspace definitions; one row per registered virtual keyspace.
- CQL:
```sql
CREATE TABLE system_virtual_schema.keyspaces (
  keyspace_name text,
  PRIMARY KEY ((keyspace_name))
);
```
- Data flow: `VirtualSchemaKeyspace.VirtualKeyspaces.data`.
- MySQL analog: `information_schema.SCHEMATA`.

### system_virtual_schema.tables
- Spec: Virtual table definitions and comments within each virtual keyspace.
- CQL:
```sql
CREATE TABLE system_virtual_schema.tables (
  keyspace_name text,
  table_name text,
  comment text,
  PRIMARY KEY ((keyspace_name), table_name)
);
```
- Data flow: `VirtualSchemaKeyspace.VirtualTables.data`.
- MySQL analog: `information_schema.TABLES`.

### system_virtual_schema.columns
- Spec: Virtual column definitions for all virtual tables.
- CQL:
```sql
CREATE TABLE system_virtual_schema.columns (
  keyspace_name text,
  table_name text,
  column_name text,
  clustering_order text,
  column_name_bytes blob,
  kind text,
  position int,
  type text,
  PRIMARY KEY ((keyspace_name), table_name, column_name)
);
```
- Data flow: `VirtualSchemaKeyspace.VirtualColumns.data`.
- MySQL analog: `information_schema.COLUMNS`.

## system_views (virtual keyspace)
- Definition: `src/java/org/apache/cassandra/db/virtual/SystemViewsKeyspace.java`.
- Notes: node-local operational and diagnostic tables. All tables except `system_logs` implicitly allow `ALLOW FILTERING`. Some tables are mutable for cache invalidation or log buffers.
- Data flow: `SystemViewsKeyspace` registers per-table implementations from `org/apache/cassandra/db/virtual` and `org/apache/cassandra/index/sai/virtual`.

### system_views.caches
- Spec: Cache metrics for chunk, counter, key, and row caches.
- CQL:
```sql
CREATE TABLE system_views.caches (
  name text,
  capacity_bytes bigint,
  size_bytes bigint,
  entry_count int,
  request_count bigint,
  hit_count bigint,
  hit_ratio double,
  recent_request_rate_per_second bigint,
  recent_hit_rate_per_second bigint,
  PRIMARY KEY ((name))
);
```
- Data flow: `CachesTable.data` reads `CacheService` and `ChunkCache` metrics.
- MySQL analog: `information_schema.INNODB_BUFFER_POOL_STATS` (approx).

### system_views.clients
- Spec: Active client connections and connection metadata.
- CQL:
```sql
CREATE TABLE system_views.clients (
  address inet,
  port int,
  hostname text,
  username text,
  connection_stage text,
  protocol_version int,
  client_options map<text, text>,
  driver_name text,
  driver_version text,
  request_count bigint,
  ssl_enabled boolean,
  ssl_protocol text,
  ssl_cipher_suite text,
  keyspace_name text,
  authentication_mode text,
  authentication_metadata map<text, text>,
  PRIMARY KEY ((address), port)
);
```
- Data flow: `ClientsTable.data` iterates `ClientMetrics.instance.allConnectedClients()`.
- MySQL analog: `performance_schema.processlist`.

### system_views.settings
- Spec: Current Cassandra configuration settings (`cassandra.yaml`) flattened to key/value.
- CQL:
```sql
CREATE TABLE system_views.settings (
  name text,
  value text,
  PRIMARY KEY ((name))
);
```
- Data flow: `SettingsTable.data` reads `DatabaseDescriptor.getRawConfig()` via `Properties` and redaction helpers.
- MySQL analog: `performance_schema.global_variables`.

### system_views.system_properties
- Spec: Cassandra-relevant environment variables and JVM system properties.
- CQL:
```sql
CREATE TABLE system_views.system_properties (
  name text,
  value text,
  PRIMARY KEY ((name))
);
```
- Data flow: `SystemPropertiesTable.data` reads `System.getenv()` and `System.getProperties()` filtered by `CassandraRelevantProperties`/`CassandraRelevantEnv`.
- MySQL analog: `performance_schema.global_variables` (approx).

### system_views.schema_comments
- Spec: Schema comments across keyspaces, tables, columns, and UDT fields.
- CQL:
```sql
CREATE TABLE system_views.schema_comments (
  object_type text,
  keyspace_name text,
  table_name text,
  column_name text,
  udt_name text,
  field_name text,
  comment text,
  PRIMARY KEY ((object_type, keyspace_name), table_name, column_name, udt_name, field_name)
);
```
- Data flow: `SchemaCommentsTable` reads `Schema.instance` metadata in `AbstractSchemaMetadataTable.data`.
- MySQL analog: `information_schema.TABLES` and `information_schema.COLUMNS` (comments).

### system_views.schema_security_labels
- Spec: Schema security labels across keyspaces, tables, columns, and UDT fields.
- CQL:
```sql
CREATE TABLE system_views.schema_security_labels (
  object_type text,
  keyspace_name text,
  table_name text,
  column_name text,
  udt_name text,
  field_name text,
  security_label text,
  PRIMARY KEY ((object_type, keyspace_name), table_name, column_name, udt_name, field_name)
);
```
- Data flow: `SchemaSecurityLabelsTable` reads `Schema.instance` metadata in `AbstractSchemaMetadataTable.data`.
- MySQL analog: none.

### system_views.sstable_tasks
- Spec: In-flight SSTable tasks (compaction, upgrade, etc.).
- CQL:
```sql
CREATE TABLE system_views.sstable_tasks (
  keyspace_name text,
  table_name text,
  task_id timeuuid,
  completion_ratio double,
  kind text,
  progress bigint,
  sstables int,
  total bigint,
  unit text,
  target_directory text,
  PRIMARY KEY ((keyspace_name), table_name, task_id)
);
```
- Data flow: `SSTableTasksTable.data` iterates `CompactionManager.instance.getSSTableTasks()`.
- MySQL analog: `performance_schema.events_stages_current` (approx).

### system_views.thread_pools
- Spec: Thread pool metrics for all thread pools.
- CQL:
```sql
CREATE TABLE system_views.thread_pools (
  name text,
  active_tasks int,
  active_tasks_limit int,
  blocked_tasks bigint,
  blocked_tasks_all_time bigint,
  completed_tasks bigint,
  core_pool_size int,
  max_pool_size int,
  max_tasks_queued int,
  pending_tasks int,
  PRIMARY KEY ((name))
);
```
- Data flow: `CollectionVirtualTableAdapter` over `Metrics.allThreadPoolMetrics()` with `ThreadPoolRowWalker`.
- MySQL analog: `performance_schema.threads` (approx).

### system_views.internode_outbound
- Spec: Outbound internode messaging counters and byte counts per peer.
- CQL:
```sql
CREATE TABLE system_views.internode_outbound (
  address inet,
  port int,
  dc text,
  rack text,
  using_bytes bigint,
  using_reserve_bytes bigint,
  pending_count bigint,
  pending_bytes bigint,
  sent_count bigint,
  sent_bytes bigint,
  expired_count bigint,
  expired_bytes bigint,
  error_count bigint,
  error_bytes bigint,
  overload_count bigint,
  overload_bytes bigint,
  active_connections bigint,
  connection_attempts bigint,
  successful_connection_attempts bigint,
  PRIMARY KEY ((address, port), dc, rack)
);
```
- Data flow: `InternodeOutboundTable.data` walks `MessagingService.instance().channelManagers` and aggregates `OutboundConnections`.
- MySQL analog: `performance_schema.replication_connection_status` (approx).

### system_views.internode_inbound
- Spec: Inbound internode messaging counters and byte counts per peer.
- CQL:
```sql
CREATE TABLE system_views.internode_inbound (
  address inet,
  port int,
  dc text,
  rack text,
  using_bytes bigint,
  using_reserve_bytes bigint,
  corrupt_frames_recovered bigint,
  corrupt_frames_unrecovered bigint,
  error_bytes bigint,
  error_count bigint,
  expired_bytes bigint,
  expired_count bigint,
  scheduled_bytes bigint,
  scheduled_count bigint,
  processed_bytes bigint,
  processed_count bigint,
  received_bytes bigint,
  received_count bigint,
  throttled_count bigint,
  throttled_nanos bigint,
  PRIMARY KEY ((address, port), dc, rack)
);
```
- Data flow: `InternodeInboundTable.data` walks `MessagingService.instance().messageHandlers`.
- MySQL analog: `performance_schema.replication_connection_status` (approx).

### system_views.pending_hints
- Spec: Pending hints stored on this node for other nodes.
- CQL:
```sql
CREATE TABLE system_views.pending_hints (
  host_id uuid,
  address inet,
  port int,
  rack text,
  dc text,
  status text,
  files int,
  total_size bigint,
  corrupted_files int,
  total_corrupted_files_size bigint,
  newest timestamp,
  oldest timestamp,
  PRIMARY KEY ((host_id))
);
```
- Data flow: `PendingHintsTable.data` uses `HintsService.instance.getPendingHintsInfo()` and `FailureDetector` states.
- MySQL analog: `performance_schema.replication_applier_status_by_worker` (approx).

### system_views.local_read_latency
- Spec: Per-table local read latency metrics (count, percentiles, max, rate).
- CQL:
```sql
CREATE TABLE system_views.local_read_latency (
  keyspace_name text,
  table_name text,
  count bigint,
  p50th_ms double,
  p99th_ms double,
  max_ms double,
  per_second double,
  PRIMARY KEY ((keyspace_name, table_name))
);
```
- Data flow: `TableMetricTables.TableMetricTable.data` iterates `ColumnFamilyStore.all()` and `TableMetrics.readLatency`.
- MySQL analog: `performance_schema.events_statements_summary_by_digest` (approx).

### system_views.local_scan_latency
- Spec: Per-table local range scan latency metrics (count, percentiles, max, rate).
- CQL:
```sql
CREATE TABLE system_views.local_scan_latency (
  keyspace_name text,
  table_name text,
  count bigint,
  p50th_ms double,
  p99th_ms double,
  max_ms double,
  per_second double,
  PRIMARY KEY ((keyspace_name, table_name))
);
```
- Data flow: `TableMetricTables.TableMetricTable.data` uses `TableMetrics.rangeLatency`.
- MySQL analog: `performance_schema.events_statements_summary_by_digest` (approx).

### system_views.coordinator_read_latency
- Spec: Per-table coordinator read latency metrics (count, percentiles, max, rate).
- CQL:
```sql
CREATE TABLE system_views.coordinator_read_latency (
  keyspace_name text,
  table_name text,
  count bigint,
  p50th_ms double,
  p99th_ms double,
  max_ms double,
  per_second double,
  PRIMARY KEY ((keyspace_name, table_name))
);
```
- Data flow: `TableMetricTables.TableMetricTable.data` uses `TableMetrics.coordinatorReadLatency`.
- MySQL analog: `performance_schema.events_statements_summary_by_digest` (approx).

### system_views.coordinator_scan_latency
- Spec: Per-table coordinator scan latency metrics (count, percentiles, max, rate).
- CQL:
```sql
CREATE TABLE system_views.coordinator_scan_latency (
  keyspace_name text,
  table_name text,
  count bigint,
  p50th_ms double,
  p99th_ms double,
  max_ms double,
  per_second double,
  PRIMARY KEY ((keyspace_name, table_name))
);
```
- Data flow: `TableMetricTables.TableMetricTable.data` uses `TableMetrics.coordinatorScanLatency`.
- MySQL analog: `performance_schema.events_statements_summary_by_digest` (approx).

### system_views.local_write_latency
- Spec: Per-table local write latency metrics (count, percentiles, max, rate).
- CQL:
```sql
CREATE TABLE system_views.local_write_latency (
  keyspace_name text,
  table_name text,
  count bigint,
  p50th_ms double,
  p99th_ms double,
  max_ms double,
  per_second double,
  PRIMARY KEY ((keyspace_name, table_name))
);
```
- Data flow: `TableMetricTables.TableMetricTable.data` uses `TableMetrics.writeLatency`.
- MySQL analog: `performance_schema.events_statements_summary_by_digest` (approx).

### system_views.coordinator_write_latency
- Spec: Per-table coordinator write latency metrics (count, percentiles, max, rate).
- CQL:
```sql
CREATE TABLE system_views.coordinator_write_latency (
  keyspace_name text,
  table_name text,
  count bigint,
  p50th_ms double,
  p99th_ms double,
  max_ms double,
  per_second double,
  PRIMARY KEY ((keyspace_name, table_name))
);
```
- Data flow: `TableMetricTables.TableMetricTable.data` uses `TableMetrics.coordinatorWriteLatency`.
- MySQL analog: `performance_schema.events_statements_summary_by_digest` (approx).

### system_views.tombstones_per_read
- Spec: Per-table tombstones-per-read histogram.
- CQL:
```sql
CREATE TABLE system_views.tombstones_per_read (
  keyspace_name text,
  table_name text,
  count bigint,
  p50th double,
  p99th double,
  max double,
  PRIMARY KEY ((keyspace_name, table_name))
);
```
- Data flow: `TableMetricTables.TableMetricTable.data` uses `TableMetrics.tombstoneScannedHistogram`.
- MySQL analog: none.

### system_views.purgeable_tombstones_per_read
- Spec: Per-table purgeable tombstones-per-read histogram.
- CQL:
```sql
CREATE TABLE system_views.purgeable_tombstones_per_read (
  keyspace_name text,
  table_name text,
  count bigint,
  p50th double,
  p99th double,
  max double,
  PRIMARY KEY ((keyspace_name, table_name))
);
```
- Data flow: `TableMetricTables.TableMetricTable.data` uses `TableMetrics.purgeableTombstoneScannedHistogram`.
- MySQL analog: none.

### system_views.rows_per_read
- Spec: Per-table rows-per-read histogram.
- CQL:
```sql
CREATE TABLE system_views.rows_per_read (
  keyspace_name text,
  table_name text,
  count bigint,
  p50th double,
  p99th double,
  max double,
  PRIMARY KEY ((keyspace_name, table_name))
);
```
- Data flow: `TableMetricTables.TableMetricTable.data` uses `TableMetrics.liveScannedHistogram`.
- MySQL analog: none.

### system_views.disk_usage
- Spec: Per-table disk usage (MiB, rounded up).
- CQL:
```sql
CREATE TABLE system_views.disk_usage (
  keyspace_name text,
  table_name text,
  mebibytes bigint,
  PRIMARY KEY ((keyspace_name, table_name))
);
```
- Data flow: `TableMetricTables.TableMetricTable.data` uses `TableMetrics.totalDiskSpaceUsed` and `StorageTableMetric` conversion.
- MySQL analog: `information_schema.TABLES` (data length, approx).

### system_views.max_partition_size
- Spec: Per-table maximum partition size (MiB, rounded up).
- CQL:
```sql
CREATE TABLE system_views.max_partition_size (
  keyspace_name text,
  table_name text,
  mebibytes bigint,
  PRIMARY KEY ((keyspace_name, table_name))
);
```
- Data flow: `TableMetricTables.TableMetricTable.data` uses `TableMetrics.maxPartitionSize` and `StorageTableMetric` conversion.
- MySQL analog: none.

### system_views.max_sstable_size
- Spec: Per-table maximum SSTable size (MiB, rounded up).
- CQL:
```sql
CREATE TABLE system_views.max_sstable_size (
  keyspace_name text,
  table_name text,
  mebibytes bigint,
  PRIMARY KEY ((keyspace_name, table_name))
);
```
- Data flow: `TableMetricTables.TableMetricTable.data` uses `TableMetrics.maxSSTableSize` and `StorageTableMetric` conversion.
- MySQL analog: none.

### system_views.max_sstable_duration
- Spec: Per-table maximum SSTable time span.
- CQL:
```sql
CREATE TABLE system_views.max_sstable_duration (
  keyspace_name text,
  table_name text,
  max_sstable_duration bigint,
  PRIMARY KEY ((keyspace_name, table_name))
);
```
- Data flow: `TableMetricTables.TableMetricTable.data` uses `TableMetrics.maxSSTableDuration`.
- MySQL analog: none.

### system_views.credentials_cache_keys
- Spec: Keys present in the credentials cache; DELETE/TRUNCATE invalidates cache entries.
- CQL:
```sql
CREATE TABLE system_views.credentials_cache_keys (
  role text,
  PRIMARY KEY ((role))
);
```
- Data flow: `CredentialsCacheKeysTable.data` reads `PasswordAuthenticator.getCredentialsCache()`; mutations call `invalidate`/`invalidateAll`.
- MySQL analog: `mysql.user` (approx).

### system_views.jmx_permissions_cache_keys
- Spec: Keys present in the JMX permissions cache; DELETE/TRUNCATE invalidates cache entries.
- CQL:
```sql
CREATE TABLE system_views.jmx_permissions_cache_keys (
  role text,
  PRIMARY KEY ((role))
);
```
- Data flow: `JmxPermissionsCacheKeysTable.data` reads `AuthorizationProxy.jmxPermissionsCache`.
- MySQL analog: `mysql.user` (approx).

### system_views.network_permissions_cache_keys
- Spec: Keys present in the network permissions cache; DELETE/TRUNCATE invalidates cache entries.
- CQL:
```sql
CREATE TABLE system_views.network_permissions_cache_keys (
  role text,
  PRIMARY KEY ((role))
);
```
- Data flow: `NetworkPermissionsCacheKeysTable.data` reads `AuthenticatedUser.networkPermissionsCache`.
- MySQL analog: `mysql.user` (approx).

### system_views.permissions_cache_keys
- Spec: Keys present in the permissions cache; DELETE/TRUNCATE invalidates cache entries.
- CQL:
```sql
CREATE TABLE system_views.permissions_cache_keys (
  role text,
  resource text,
  PRIMARY KEY ((role, resource))
);
```
- Data flow: `PermissionsCacheKeysTable.data` reads `AuthenticatedUser.permissionsCache`.
- MySQL analog: `mysql.db` (approx).

### system_views.roles_cache_keys
- Spec: Keys present in the roles cache; DELETE/TRUNCATE invalidates cache entries.
- CQL:
```sql
CREATE TABLE system_views.roles_cache_keys (
  role text,
  PRIMARY KEY ((role))
);
```
- Data flow: `RolesCacheKeysTable.data` reads `Roles.cache`.
- MySQL analog: `mysql.user` (approx).

### system_views.cql_metrics
- Spec: Deprecated table for CQL prepared statement cache metrics.
- CQL:
```sql
CREATE TABLE system_views.cql_metrics (
  name text,
  value double,
  PRIMARY KEY ((name))
);
```
- Data flow: `CQLMetricsTable.data` reads `QueryProcessor.metrics` and emits a deprecation warning.
- MySQL analog: `performance_schema.prepared_statements_instances` (approx).

### system_views.batch_metrics
- Spec: Deprecated table for batch statement metrics.
- CQL:
```sql
CREATE TABLE system_views.batch_metrics (
  name text,
  p50th double,
  p99th double,
  p999th double,
  max bigint,
  PRIMARY KEY ((name))
);
```
- Data flow: `BatchMetricsTable.data` reads `BatchStatement.metrics` and emits a deprecation warning.
- MySQL analog: `performance_schema.events_statements_summary_by_digest` (approx).

### system_views.partition_key_statistics
- Spec: SSTable-level partition key statistics for a specific keyspace/table; read-only and requires a single partition (keyspace_name, table_name).
- CQL:
```sql
CREATE TABLE system_views.partition_key_statistics (
  keyspace_name text,
  table_name text,
  token_value varint,
  key text,
  size_estimate counter,
  sstables counter,
  PRIMARY KEY ((keyspace_name, table_name), token_value, key)
);
```
- Data flow: `PartitionKeyStatsTable.select` reads SSTable keys via `KeyReader` and aggregates per-key size and SSTable counts.
- MySQL analog: `information_schema.INNODB_INDEX_STATS` (approx).

### system_views.streaming
- Spec: Stream plan status and per-session progress for active streaming operations.
- CQL:
```sql
CREATE TABLE system_views.streaming (
  id timeuuid,
  follower boolean,
  operation text,
  peers frozen<list<text>>,
  status text,
  progress_percentage float,
  last_updated_at timestamp,
  duration_millis bigint,
  failure_cause text,
  success_message text,
  bytes_to_receive bigint,
  bytes_received bigint,
  bytes_to_send bigint,
  bytes_sent bigint,
  files_to_receive bigint,
  files_received bigint,
  files_to_send bigint,
  files_sent bigint,
  status_init_timestamp timestamp,
  status_start_timestamp timestamp,
  status_success_timestamp timestamp,
  status_failure_timestamp timestamp,
  PRIMARY KEY ((id))
);
```
- Data flow: `StreamingVirtualTable.data` reads `StreamManager.instance.getStreamingStates()` and `StreamingState.Sessions`.
- MySQL analog: none.

### system_views.gossip_info
- Spec: Gossip state per peer, with one text column per `ApplicationState` value (except `TOKENS`) and one version column per value.
- CQL:
```sql
CREATE TABLE system_views.gossip_info (
  address inet,
  port int,
  hostname text,
  generation int,
  heartbeat int,
  status text,
  load text,
  schema text,
  dc text,
  rack text,
  release_version text,
  removal_coordinator text,
  internal_ip text,
  rpc_address text,
  x_11_padding text,
  severity text,
  net_version text,
  host_id text,
  rpc_ready text,
  internal_address_and_port text,
  native_address_and_port text,
  status_with_port text,
  sstable_versions text,
  disk_usage text,
  index_status text,
  x1 text,
  x2 text,
  x3 text,
  x4 text,
  x5 text,
  x6 text,
  x7 text,
  x8 text,
  x9 text,
  x10 text,
  status_version int,
  load_version int,
  schema_version int,
  dc_version int,
  rack_version int,
  release_version_version int,
  removal_coordinator_version int,
  internal_ip_version int,
  rpc_address_version int,
  x_11_padding_version int,
  severity_version int,
  net_version_version int,
  host_id_version int,
  tokens_version int,
  rpc_ready_version int,
  internal_address_and_port_version int,
  native_address_and_port_version int,
  status_with_port_version int,
  sstable_versions_version int,
  disk_usage_version int,
  index_status_version int,
  x1_version int,
  x2_version int,
  x3_version int,
  x4_version int,
  x5_version int,
  x6_version int,
  x7_version int,
  x8_version int,
  x9_version int,
  x10_version int,
  PRIMARY KEY ((address), port)
);
```
- Data flow: `GossipInfoTable.data` reads `Gossiper.instance.endpointStateMap` and converts each `ApplicationState` to value/version columns.
- MySQL analog: `performance_schema.replication_group_members` (approx).

### system_views.queries
- Spec: Currently running queries and their queued/running durations.
- CQL:
```sql
CREATE TABLE system_views.queries (
  thread_id text,
  queued_micros bigint,
  running_micros bigint,
  task text,
  PRIMARY KEY ((thread_id))
);
```
- Data flow: `QueriesTable.data` walks `SharedExecutorPool.SHARED.workers()` and `AccordExecutor` active tasks.
- MySQL analog: `performance_schema.events_statements_current` (approx).

### system_views.system_logs
- Spec: Bounded in-memory log buffer populated by the virtual table appender; TRUNCATE clears buffer.
- CQL:
```sql
CREATE TABLE system_views.system_logs (
  timestamp timestamp,
  order_in_millisecond int,
  logger text,
  level text,
  message text,
  PRIMARY KEY ((timestamp), order_in_millisecond)
);
```
- Data flow: `LogMessagesTable` stores `LoggingEvent` entries via `VirtualTableAppender`/`AbstractLoggerVirtualTable.add`.
- MySQL analog: `performance_schema.error_log` (approx).

### system_views.slow_queries
- Spec: Bounded in-memory log of slow queries; TRUNCATE clears buffer.
- CQL:
```sql
CREATE TABLE system_views.slow_queries (
  keyspace_name text,
  table_name text,
  timestamp timestamp,
  query text,
  min_ms bigint,
  max_ms bigint,
  avg_ms bigint,
  times_reported int,
  cross_node boolean,
  PRIMARY KEY ((keyspace_name), table_name, timestamp, query)
);
```
- Data flow: `SlowQueriesTable` consumes `MonitoringTask.Operation` logs via the virtual table appender.
- MySQL analog: `performance_schema.events_statements_summary_by_digest`.

### system_views.snapshots
- Spec: Snapshot inventory for each table (sizes and timestamps).
- CQL:
```sql
CREATE TABLE system_views.snapshots (
  name text,
  keyspace_name text,
  table_name text,
  true_size bigint,
  size_on_disk bigint,
  created_at timestamp,
  expires_at timestamp,
  ephemeral boolean,
  PRIMARY KEY ((name), keyspace_name, table_name)
);
```
- Data flow: `SnapshotsTable.data` reads `SnapshotManager.instance.getSnapshots()`.
- MySQL analog: `information_schema.INNODB_TABLESPACES` (approx).

### system_views.peers
- Spec: Cluster peer metadata derived from `ClusterMetadata` (virtualized peer view).
- CQL:
```sql
CREATE TABLE system_views.peers (
  peer inet,
  peer_port int,
  data_center text,
  rack text,
  host_id uuid,
  preferred_ip inet,
  preferred_port int,
  native_address inet,
  native_port int,
  release_version text,
  schema_version uuid,
  state text,
  tokens set<text>,
  PRIMARY KEY ((peer), peer_port)
);
```
- Data flow: `PeersTable.data` reads `ClusterMetadata.current()` directory and token map; `PeersTable.updateLegacyPeerTable` keeps storage-backed peers tables in sync.
- MySQL analog: `performance_schema.replication_group_members`.

### system_views.local
- Spec: Local node metadata (virtualized `system.local`).
- CQL:
```sql
CREATE TABLE system_views.local (
  key text,
  bootstrapped text,
  broadcast_address inet,
  broadcast_port int,
  cluster_name text,
  cql_version text,
  datacenter text,
  gossip_generation int,
  host_id uuid,
  listen_address inet,
  listen_port int,
  native_address inet,
  native_port int,
  native_protocol_version text,
  partitioner text,
  rack text,
  release_version text,
  schema_version uuid,
  state text,
  status text,
  tokens set<text>,
  PRIMARY KEY ((key))
);
```
- Data flow: `LocalTable.data` reads `ClusterMetadata.current()`, `SystemKeyspace.BootstrapState`, `DatabaseDescriptor`, and `Gossiper`.
- MySQL analog: `performance_schema.global_variables` and `performance_schema.global_status` (approx).

### system_views.cluster_metadata_log
- Spec: Cluster metadata log entries decoded from the distributed metadata log.
- CQL:
```sql
CREATE TABLE system_views.cluster_metadata_log (
  epoch bigint,
  kind text,
  transformation text,
  entry_id bigint,
  entry_time timestamp,
  PRIMARY KEY ((epoch))
);
```
- Data flow: `ClusterMetadataLogTable.data` executes a local CQL query against `system_cluster_metadata.distributed_metadata_log`.
- MySQL analog: none.

### system_views.cluster_metadata_directory
- Spec: Directory of cluster membership and address metadata from `ClusterMetadata`.
- CQL:
```sql
CREATE TABLE system_views.cluster_metadata_directory (
  node_id int,
  host_id uuid,
  state text,
  cassandra_version text,
  serialization_version int,
  rack text,
  dc text,
  broadcast_address inet,
  broadcast_port int,
  local_address inet,
  local_port int,
  native_address inet,
  native_port int,
  tokens list<text>,
  multi_step_operation map<text, text>,
  PRIMARY KEY ((node_id))
);
```
- Data flow: `ClusterMetadataDirectoryTable.data` reads `ClusterMetadata.current().directory` and token map.
- MySQL analog: `performance_schema.replication_group_members` (approx).

### system_views.repairs
- Spec: Repair coordinator summary with options, ranges, participants, and state timestamps.
- CQL:
```sql
CREATE TABLE system_views.repairs (
  id timeuuid,
  last_updated_at timestamp,
  completed boolean,
  duration_millis bigint,
  failure_cause text,
  success_message text,
  state_init_timestamp timestamp,
  state_success_timestamp timestamp,
  state_skipped_timestamp timestamp,
  state_failure_timestamp timestamp,
  status text,
  command_id int,
  keyspace_name text,
  type text,
  sessions frozen<set<timeuuid>>,
  options_parallelism text,
  options_primary_range boolean,
  options_incremental boolean,
  options_trace boolean,
  options_job_threads int,
  options_subrange_repair boolean,
  options_pull_repair boolean,
  options_force_repair boolean,
  options_preview_kind text,
  options_optimise_streams boolean,
  options_ignore_unreplicated_keyspaces boolean,
  options_column_families frozen<set<text>>,
  options_data_centers frozen<set<text>>,
  options_hosts frozen<set<text>>,
  options_ranges frozen<set<text>>,
  table_names frozen<list<text>>,
  ranges frozen<list<list<text>>>,
  unfiltered_ranges frozen<list<list<text>>>,
  participants frozen<list<text>>,
  state_setup_timestamp timestamp,
  state_start_timestamp timestamp,
  state_prepare_start_timestamp timestamp,
  state_prepare_complete_timestamp timestamp,
  state_repair_start_timestamp timestamp,
  state_repair_complete_timestamp timestamp,
  PRIMARY KEY ((id))
);
```
- Data flow: `LocalRepairTables.RepairTable.data` reads `ActiveRepairService.instance().coordinators()`.
- MySQL analog: none.

### system_views.repair_sessions
- Spec: Repair session summary for each coordinator repair.
- CQL:
```sql
CREATE TABLE system_views.repair_sessions (
  id timeuuid,
  last_updated_at timestamp,
  completed boolean,
  duration_millis bigint,
  failure_cause text,
  success_message text,
  state_init_timestamp timestamp,
  state_success_timestamp timestamp,
  state_skipped_timestamp timestamp,
  state_failure_timestamp timestamp,
  status text,
  repair_id timeuuid,
  keyspace_name text,
  table_names frozen<list<text>>,
  ranges frozen<list<text>>,
  participants frozen<list<text>>,
  jobs frozen<set<uuid>>,
  state_start_timestamp timestamp,
  state_jobs_start_timestamp timestamp,
  PRIMARY KEY ((id))
);
```
- Data flow: `LocalRepairTables.SessionTable.data` reads sessions from `ActiveRepairService.instance().coordinators()`.
- MySQL analog: none.

### system_views.repair_jobs
- Spec: Repair job state and participant details.
- CQL:
```sql
CREATE TABLE system_views.repair_jobs (
  id uuid,
  last_updated_at timestamp,
  completed boolean,
  duration_millis bigint,
  failure_cause text,
  success_message text,
  state_init_timestamp timestamp,
  state_success_timestamp timestamp,
  state_skipped_timestamp timestamp,
  state_failure_timestamp timestamp,
  status text,
  participants frozen<list<text>>,
  repair_id timeuuid,
  session_id timeuuid,
  keyspace_name text,
  table_name text,
  ranges frozen<list<text>>,
  state_start_timestamp timestamp,
  state_snapshot_start_timestamp timestamp,
  state_snapshot_complete_timestamp timestamp,
  state_validation_start_timestamp timestamp,
  state_validation_complete_timestamp timestamp,
  state_stream_start_timestamp timestamp,
  PRIMARY KEY ((id))
);
```
- Data flow: `LocalRepairTables.JobTable.data` reads jobs from coordinator sessions.
- MySQL analog: none.

### system_views.repair_participates
- Spec: Repair participation summary for this node.
- CQL:
```sql
CREATE TABLE system_views.repair_participates (
  id timeuuid,
  last_updated_at timestamp,
  completed boolean,
  duration_millis bigint,
  failure_cause text,
  success_message text,
  state_init_timestamp timestamp,
  state_success_timestamp timestamp,
  state_skipped_timestamp timestamp,
  state_failure_timestamp timestamp,
  initiator text,
  tables frozen<set<text>>,
  ranges frozen<list<text>>,
  incremental boolean,
  global boolean,
  preview_kind text,
  repaired_at timestamp,
  validations frozen<set<uuid>>,
  PRIMARY KEY ((id))
);
```
- Data flow: `LocalRepairTables.ParticipateTable.data` reads `ActiveRepairService.instance().participates()`.
- MySQL analog: none.

### system_views.repair_validations
- Spec: Repair validation state and progress metrics.
- CQL:
```sql
CREATE TABLE system_views.repair_validations (
  id uuid,
  last_updated_at timestamp,
  completed boolean,
  duration_millis bigint,
  failure_cause text,
  success_message text,
  state_init_timestamp timestamp,
  state_success_timestamp timestamp,
  state_skipped_timestamp timestamp,
  state_failure_timestamp timestamp,
  status text,
  repair_id timeuuid,
  session_id timeuuid,
  keyspace_name text,
  table_name text,
  ranges frozen<list<text>>,
  initiator text,
  estimated_partitions bigint,
  estimated_total_bytes bigint,
  partitions_processed bigint,
  bytes_read bigint,
  progress_percentage float,
  state_accept_timestamp timestamp,
  state_start_timestamp timestamp,
  state_sending_trees_timestamp timestamp,
  PRIMARY KEY ((id))
);
```
- Data flow: `LocalRepairTables.ValidationTable.data` reads `ActiveRepairService.instance().validations()`.
- MySQL analog: none.

### system_views.cidr_filtering_metrics_counts
- Spec: CIDR filtering count metrics (accepted/rejected by group, cache reload count).
- CQL:
```sql
CREATE TABLE system_views.cidr_filtering_metrics_counts (
  name text,
  value bigint,
  PRIMARY KEY ((name))
);
```
- Data flow: `CIDRFilteringMetricsCountsTable.data` reads `DatabaseDescriptor.getCIDRAuthorizer().getCidrAuthorizerMetrics()`.
- MySQL analog: none.

### system_views.cidr_filtering_metrics_latencies
- Spec: CIDR filtering latency metrics (percentiles and max).
- CQL:
```sql
CREATE TABLE system_views.cidr_filtering_metrics_latencies (
  name text,
  p50th double,
  p95th double,
  p99th double,
  p999th double,
  max double,
  PRIMARY KEY ((name))
);
```
- Data flow: `CIDRFilteringMetricsLatenciesTable.data` reads `CIDRAuthorizerMetrics` histograms.
- MySQL analog: none.

### system_views.sai_column_indexes
- Spec: Storage-attached index metadata per indexed column.
- CQL:
```sql
CREATE TABLE system_views.sai_column_indexes (
  keyspace_name text,
  index_name text,
  table_name text,
  column_name text,
  is_queryable boolean,
  is_building boolean,
  is_string boolean,
  analyzer text,
  PRIMARY KEY ((keyspace_name), index_name)
);
```
- Data flow: `ColumnIndexesSystemView.data` walks `Schema.instance.getUserKeyspaces()` and SAI index groups.
- MySQL analog: `information_schema.STATISTICS` (approx).

### system_views.sai_sstable_index_segments
- Spec: Per-SSTable SAI segment metadata.
- CQL:
```sql
CREATE TABLE system_views.sai_sstable_index_segments (
  keyspace_name text,
  index_name text,
  sstable_name text,
  segment_row_id_offset bigint,
  table_name text,
  column_name text,
  cell_count bigint,
  min_sstable_row_id bigint,
  max_sstable_row_id bigint,
  start_token text,
  end_token text,
  min_term text,
  max_term text,
  component_metadata map<text, map<text, text>>,
  PRIMARY KEY ((keyspace_name), index_name, sstable_name, segment_row_id_offset)
);
```
- Data flow: `SegmentsSystemView.data` calls `SSTableIndex.populateSegmentView` for each SAI index.
- MySQL analog: none.

### system_views.sai_sstable_indexes
- Spec: Per-SSTable SAI index metadata.
- CQL:
```sql
CREATE TABLE system_views.sai_sstable_indexes (
  keyspace_name text,
  index_name text,
  sstable_name text,
  table_name text,
  column_name text,
  format_version text,
  cell_count bigint,
  min_row_id bigint,
  max_row_id bigint,
  start_token text,
  end_token text,
  per_table_disk_size bigint,
  per_column_disk_size bigint,
  PRIMARY KEY ((keyspace_name), index_name, sstable_name)
);
```
- Data flow: `SSTableIndexesSystemView.data` iterates SAI index views and SSTable descriptors.
- MySQL analog: `information_schema.INNODB_INDEX_STATS` (approx).

### system_views.accord_epochs
- Spec: Accord epoch readiness state (only registered when Accord is enabled).
- CQL:
```sql
CREATE TABLE system_views.accord_epochs (
  epoch bigint,
  ready_active text,
  ready_coordinate text,
  ready_data text,
  ready_reads text,
  ready boolean,
  PRIMARY KEY ((epoch))
);
```
- Data flow: `AccordVirtualTables.EpochReadyTable.data` reads `AccordService.instance().topology().active()`.
- MySQL analog: none.

### system_views.accord_table_epochs
- Spec: Accord epoch range changes by table (only registered when Accord is enabled).
- CQL:
```sql
CREATE TABLE system_views.accord_table_epochs (
  epoch bigint,
  keyspace_name text,
  table_name text,
  added frozen<list<text>>,
  removed frozen<list<text>>,
  synced frozen<list<text>>,
  closed frozen<list<text>>,
  retired frozen<list<text>>,
  PRIMARY KEY (epoch, keyspace_name, table_name)
);
```
- Data flow: `AccordVirtualTables.EpochSyncRanges.data` reads `AccordService.instance().topology().active()` and groups ranges by table.
- MySQL analog: none.

### system_views.uncaught_exceptions
- Spec: Bounded buffer of uncaught exceptions; TRUNCATE clears buffer.
- CQL:
```sql
CREATE TABLE system_views.uncaught_exceptions (
  exception_class text,
  exception_location text,
  count int,
  last_message text,
  last_stacktrace list<text>,
  last_occurrence timestamp,
  PRIMARY KEY ((exception_class), exception_location)
);
```
- Data flow: `ExceptionsTable.persist` and `ExceptionsTable.data` maintain an in-memory bounded map.
- MySQL analog: `performance_schema.error_log` (approx).

## system_metrics (virtual keyspace)
- Definition: `src/java/org/apache/cassandra/metrics/CassandraMetricsRegistry.java` and `src/java/org/apache/cassandra/db/virtual/CollectionVirtualTableAdapter.java`.
- Notes: Metrics tables are generated at startup from the Dropwizard registry; data is node-local and reflects in-memory metrics.

### system_metrics.all_groups
- Spec: Metric group names and their corresponding virtual table names.
- CQL:
```sql
CREATE TABLE system_metrics.all_groups (
  group_name text,
  virtual_table text,
  PRIMARY KEY ((group_name))
);
```
- Data flow: `CassandraMetricsRegistry.createMetricsKeyspaceTables` populates from `metricGroups`.
- MySQL analog: `performance_schema.setup_instruments` (approx).

### system_metrics.<group>_group tables
- Spec: One table per metrics group; each row is a metric with its scope, type, and value.
- CQL:
```sql
CREATE TABLE system_metrics.<group>_group (
  name text,
  scope text,
  type text,
  value text,
  PRIMARY KEY ((name))
);
```
- Tables: `accord_cache_group`, `accord_coordinator_group`, `accord_executor_group`, `accord_replica_group`, `accord_system_group`, `autorepair_group`, `batch_group`, `buffer_pool_group`, `cache_group`, `chunk_cache_group`, `cidr_authorizer_group`, `client_group`, `client_message_size_group`, `client_request_group`, `client_request_size_group`, `column_family_group`, `commit_log_group`, `compaction_group`, `connection_group`, `cql_group`, `dropped_message_group`, `hints_service_group`, `index_column_family_group`, `index_group`, `index_table_group`, `internode_inbound_group`, `journal_group`, `keyspace_group`, `memtable_pool_group`, `messaging_group`, `mutual_tls_group`, `paxos_group`, `read_repair_group`, `repair_group`, `route_index_group`, `storage_attached_index_group`, `storage_group`, `storage_proxy_group`, `streaming_group`, `table_group`, `tcm_group`, `thread_pools_group`, `trie_memtable_group`, `unweighted_cache_group`.
- Data flow: `CassandraMetricsRegistry.createMetricsKeyspaceTables` uses `CollectionVirtualTableAdapter` with `MetricRowWalker` over `Metrics.getMetrics()` filtered by group prefix.
- MySQL analog: `performance_schema.events_waits_summary_global_by_event_name` (approx).

### system_metrics.type_counter
- Spec: Counter metrics across all groups.
- CQL:
```sql
CREATE TABLE system_metrics.type_counter (
  name text,
  scope text,
  value bigint,
  PRIMARY KEY ((name))
);
```
- Data flow: `CassandraMetricsRegistry.createMetricsKeyspaceTables` filters `Metrics.getMetrics()` by `Counter.class`.
- MySQL analog: `performance_schema.global_status` (approx).

### system_metrics.type_gauge
- Spec: Gauge metrics across all groups, rendered as string values.
- CQL:
```sql
CREATE TABLE system_metrics.type_gauge (
  name text,
  scope text,
  value text,
  PRIMARY KEY ((name))
);
```
- Data flow: `CassandraMetricsRegistry.createMetricsKeyspaceTables` filters `Gauge` metrics and stringifies values.
- MySQL analog: `performance_schema.global_status` (approx).

### system_metrics.type_histogram
- Spec: Histogram metrics across all groups.
- CQL:
```sql
CREATE TABLE system_metrics.type_histogram (
  name text,
  max bigint,
  mean double,
  min bigint,
  p75th double,
  p95th double,
  p98th double,
  p999th double,
  p99th double,
  scope text,
  PRIMARY KEY ((name))
);
```
- Data flow: `CassandraMetricsRegistry.createMetricsKeyspaceTables` filters `OverrideHistogram` metrics and uses `HistogramMetricRow`.
- MySQL analog: `performance_schema.events_statements_summary_by_digest` (approx).

### system_metrics.type_meter
- Spec: Meter metrics across all groups.
- CQL:
```sql
CREATE TABLE system_metrics.type_meter (
  name text,
  count bigint,
  fifteen_minute_rate double,
  five_minute_rate double,
  mean_rate double,
  one_minute_rate double,
  scope text,
  PRIMARY KEY ((name))
);
```
- Data flow: `CassandraMetricsRegistry.createMetricsKeyspaceTables` filters `Meter` metrics and uses `MeterMetricRow`.
- MySQL analog: `performance_schema.events_statements_summary_by_digest` (approx).

### system_metrics.type_timer
- Spec: Timer metrics across all groups.
- CQL:
```sql
CREATE TABLE system_metrics.type_timer (
  name text,
  max double,
  mean double,
  min double,
  p75th double,
  p95th double,
  p98th double,
  p999th double,
  p99th double,
  count bigint,
  fifteen_minute_rate double,
  five_minute_rate double,
  mean_rate double,
  one_minute_rate double,
  scope text,
  PRIMARY KEY ((name))
);
```
- Data flow: `CassandraMetricsRegistry.createMetricsKeyspaceTables` filters `Timer` metrics and uses `TimerMetricRow`.
- MySQL analog: `performance_schema.events_statements_summary_by_digest` (approx).

## system_accord_debug (virtual keyspace)
- Definition: `src/java/org/apache/cassandra/db/virtual/AccordDebugKeyspace.java`.
- Notes: registered only when Accord transactions are enabled; intended for debugging and operations. Tables are node-local; some are write-only (`txn_ops`, `node_ops`, `command_store_ops`).

### system_accord_debug.constants
- Spec: Enumerated Accord constants (operation names and descriptions).
- CQL:
```sql
CREATE TABLE system_accord_debug.constants (
  kind text,
  name text,
  description text,
  PRIMARY KEY (kind, name)
);
```
- Data flow: `ConstantsTable` builds a static `SimpleDataSet` from enum values.
- MySQL analog: none.

### system_accord_debug.executors
- Spec: Accord executor task snapshots and scheduling state.
- CQL:
```sql
CREATE TABLE system_accord_debug.executors (
  executor_id int,
  status text,
  position int,
  unique_position int,
  description text,
  command_store_id int,
  txn_id 'TxnIdUtf8Type',
  txn_id_additional 'TxnIdUtf8Type',
  keys text,
  keys_loading text,
  keys_loading_for text,
  PRIMARY KEY (executor_id, status, position, unique_position)
);
```
- Data flow: `ExecutorsTable.collect` iterates `AccordCommandStores.executors()` task snapshots.
- MySQL analog: none.

### system_accord_debug.coordinations
- Spec: Active Accord coordination state per transaction.
- CQL:
```sql
CREATE TABLE system_accord_debug.coordinations (
  txn_id 'TxnIdUtf8Type',
  coordination_id bigint,
  kind text,
  description text,
  nodes text,
  nodes_inflight text,
  nodes_contacted text,
  participants text,
  replies text,
  tracker text,
  PRIMARY KEY (txn_id, coordination_id, kind)
);
```
- Data flow: `CoordinationsTable.collect` reads `AccordService.unsafeInstance().node().coordinations()`.
- MySQL analog: none.

### system_accord_debug.commands_for_key
- Spec: Managed per-key transaction state across command stores (single-key queries only).
- CQL:
```sql
CREATE TABLE system_accord_debug.commands_for_key (
  key text,
  command_store_id int,
  txn_id 'TxnIdUtf8Type',
  ballot text,
  deps_known_before text,
  execute_at text,
  flags text,
  missing text,
  status text,
  status_overrides text,
  PRIMARY KEY (key, command_store_id, txn_id)
);
```
- Data flow: `CommandsForKeyTable.collect` traverses `CommandStores.forEach` on the requested key.
- MySQL analog: none.

### system_accord_debug.commands_for_key_unmanaged
- Spec: Unmanaged per-key transaction state across command stores (single-key queries only).
- CQL:
```sql
CREATE TABLE system_accord_debug.commands_for_key_unmanaged (
  key text,
  command_store_id int,
  txn_id 'TxnIdUtf8Type',
  waiting_until text,
  waiting_until_status text,
  PRIMARY KEY (key, command_store_id, txn_id)
);
```
- Data flow: `CommandsForKeyUnmanagedTable.collect` walks `CommandsForKey.unmanaged` entries.
- MySQL analog: none.

### system_accord_debug.durability_service
- Spec: Durability service state per range/shard.
- CQL:
```sql
CREATE TABLE system_accord_debug.durability_service (
  table_id text,
  token_start 'TokenUtf8Type',
  token_end 'TokenUtf8Type',
  last_started_at bigint,
  cycle_started_at bigint,
  retries int,
  min text,
  requested_by text,
  active text,
  waiting text,
  node_offset int,
  cycle_offset int,
  active_index int,
  next_index int,
  next_to_index int,
  end_index int,
  current_splits int,
  stopping boolean,
  stopped boolean,
  PRIMARY KEY (table_id, token_start)
);
```
- Data flow: `DurabilityServiceTable.collect` reads `AccordService.shardDurability()`.
- MySQL analog: none.

### system_accord_debug.durable_before
- Spec: Durable-before bounds per range/shard.
- CQL:
```sql
CREATE TABLE system_accord_debug.durable_before (
  table_id text,
  token_start 'TokenUtf8Type',
  token_end 'TokenUtf8Type',
  quorum 'TxnIdUtf8Type',
  universal 'TxnIdUtf8Type',
  PRIMARY KEY (table_id, token_start)
);
```
- Data flow: `DurableBeforeTable.collect` reads `AccordService.unsafeInstance().node().durableBefore()`.
- MySQL analog: none.

### system_accord_debug.executor_cache
- Spec: Executor cache hit/miss counters by cache scope.
- CQL:
```sql
CREATE TABLE system_accord_debug.executor_cache (
  executor_id int,
  scope text,
  queries bigint,
  hits bigint,
  misses bigint,
  PRIMARY KEY (executor_id, scope)
);
```
- Data flow: `ExecutorCacheTable.collect` reads `AccordExecutor.lockCaches()` stats.
- MySQL analog: none.

### system_accord_debug.listeners_deps
- Spec: Dependency listeners per command store.
- CQL:
```sql
CREATE TABLE system_accord_debug.listeners_deps (
  command_store_id int,
  waiting_on 'TxnIdUtf8Type',
  waiting_until text,
  waiter 'TxnIdUtf8Type',
  PRIMARY KEY (command_store_id, waiting_on, waiting_until, waiter)
);
```
- Data flow: `ListenersDepsTable.collect` reads `LocalListeners.txnListeners()`.
- MySQL analog: none.

### system_accord_debug.listeners_local
- Spec: Local listeners per command store.
- CQL:
```sql
CREATE TABLE system_accord_debug.listeners_local (
  command_store_id int,
  waiting_on 'TxnIdUtf8Type',
  waiter text,
  PRIMARY KEY (command_store_id, waiting_on, waiter)
);
```
- Data flow: `ListenersLocalTable.collect` reads `LocalListeners.complexListeners()`.
- MySQL analog: none.

### system_accord_debug.max_conflicts
- Spec: Max-conflicts watermark by command store and range.
- CQL:
```sql
CREATE TABLE system_accord_debug.max_conflicts (
  command_store_id bigint,
  token_start 'TokenUtf8Type',
  table_id text,
  token_end 'TokenUtf8Type',
  timestamp text,
  PRIMARY KEY (command_store_id, token_start)
);
```
- Data flow: `MaxConflictsTable.collect` reads `CommandStore.unsafeGetMaxConflicts()`.
- MySQL analog: none.

### system_accord_debug.migration_state
- Spec: Consensus migration state for Accord-enabled tables.
- CQL:
```sql
CREATE TABLE system_accord_debug.migration_state (
  keyspace_name text,
  table_name text,
  table_id uuid,
  target_protocol text,
  transactional_mode text,
  transactional_migration_from text,
  migrated_ranges frozen<list<text>>,
  repair_pending_ranges frozen<list<text>>,
  migrating_ranges_by_epoch frozen<map<bigint, list<text>>>,
  PRIMARY KEY (keyspace_name, table_name)
);
```
- Data flow: `MigrationStateTable.data` reads `ClusterMetadata.current().consensusMigrationState`.
- MySQL analog: none.

### system_accord_debug.progress_log
- Spec: Progress log state per command store and transaction.
- CQL:
```sql
CREATE TABLE system_accord_debug.progress_log (
  command_store_id int,
  txn_id 'TxnIdUtf8Type',
  table_id text,
  contact_everyone boolean,
  waiting_is_uninitialised boolean,
  waiting_blocked_until text,
  waiting_home_satisfies text,
  waiting_progress text,
  waiting_retry_counter int,
  waiting_packed_key_tracker_bits text,
  waiting_scheduled_at timestamp,
  home_phase text,
  home_progress text,
  home_retry_counter int,
  home_scheduled_at timestamp,
  PRIMARY KEY (command_store_id, txn_id)
);
```
- Data flow: `ProgressLogTable.collect` reads `DefaultProgressLog.ImmutableView` from each command store.
- MySQL analog: none.

### system_accord_debug.redundant_before
- Spec: Redundant-before bounds per command store and range.
- CQL:
```sql
CREATE TABLE system_accord_debug.redundant_before (
  command_store_id int,
  token_start 'TokenUtf8Type',
  table_id text,
  token_end 'TokenUtf8Type',
  start_epoch bigint,
  end_epoch bigint,
  gc_before 'TxnIdUtf8Type',
  shard_applied 'TxnIdUtf8Type',
  quorum_applied 'TxnIdUtf8Type',
  locally_applied 'TxnIdUtf8Type',
  locally_durable_to_command_store 'TxnIdUtf8Type',
  locally_durable_to_data_store 'TxnIdUtf8Type',
  locally_redundant 'TxnIdUtf8Type',
  locally_synced 'TxnIdUtf8Type',
  locally_witnessed 'TxnIdUtf8Type',
  log_unavailable 'TxnIdUtf8Type',
  unready 'TxnIdUtf8Type',
  stale_until_at_least 'TxnIdUtf8Type',
  PRIMARY KEY (command_store_id, token_start)
);
```
- Data flow: `RedundantBeforeTable.collect` reads `CommandStore.unsafeGetRedundantBefore()`.
- MySQL analog: none.

### system_accord_debug.reject_before
- Spec: Reject-before bounds per command store and range.
- CQL:
```sql
CREATE TABLE system_accord_debug.reject_before (
  command_store_id int,
  token_start 'TokenUtf8Type',
  table_id text,
  token_end 'TokenUtf8Type',
  timestamp text,
  PRIMARY KEY (command_store_id, token_start)
);
```
- Data flow: `RejectBeforeTable.collect` reads `CommandStore.unsafeGetRejectBefore()`.
- MySQL analog: none.

### system_accord_debug.txn_trace
- Spec: Transaction trace configuration (mutable; UPDATE/DELETE control tracing).
- CQL:
```sql
CREATE TABLE system_accord_debug.txn_trace (
  txn_id 'TxnIdUtf8Type',
  bucket_mode text,
  bucket_seen int,
  bucket_size int,
  bucket_sub_size int,
  chance float,
  current_size int,
  trace_events text,
  managed_by_pattern boolean,
  PRIMARY KEY (txn_id)
);
```
- Data flow: `TxnTraceTable.collect` reads `AccordTracing` configuration; updates call `AccordTracing.set/stopTracing`.
- MySQL analog: none.

### system_accord_debug.txn_traces
- Spec: Transaction trace events (mutable; DELETE/TRUNCATE clears events).
- CQL:
```sql
CREATE TABLE system_accord_debug.txn_traces (
  txn_id 'TxnIdUtf8Type',
  id_micros bigint,
  event text,
  at_micros bigint,
  command_store_id int,
  message text,
  PRIMARY KEY (txn_id, id_micros, event, at_micros)
);
```
- Data flow: `TxnTracesTable.collect` reads `AccordTracing` event buffers.
- MySQL analog: none.

### system_accord_debug.txn_pattern_trace
- Spec: Pattern-based trace configuration (mutable; UPDATE/DELETE manage patterns).
- CQL:
```sql
CREATE TABLE system_accord_debug.txn_pattern_trace (
  id int,
  bucket_mode text,
  bucket_seen int,
  bucket_size int,
  chance float,
  current_size int,
  if_intersects text,
  if_kind text,
  on_failure text,
  on_new text,
  trace_bucket_mode text,
  trace_bucket_size int,
  trace_bucket_sub_size int,
  trace_events text,
  PRIMARY KEY (id)
);
```
- Data flow: `TxnPatternTraceTable.collect` and `AccordTracing.setPattern`.
- MySQL analog: none.

### system_accord_debug.txn_pattern_traces
- Spec: Pattern trace membership (mutable; DELETE/TRUNCATE clears pattern traces).
- CQL:
```sql
CREATE TABLE system_accord_debug.txn_pattern_traces (
  id int,
  txn_id 'TxnIdUtf8Type',
  PRIMARY KEY (id, txn_id)
);
```
- Data flow: `TxnPatternTracesTable.collect` reads pattern trace state from `AccordTracing`.
- MySQL analog: none.

### system_accord_debug.txn
- Spec: Per-command-store transaction state loaded from the Accord journal.
- CQL:
```sql
CREATE TABLE system_accord_debug.txn (
  command_store_id int,
  txn_id 'TxnIdUtf8Type',
  save_status text,
  route text,
  durability text,
  execute_at text,
  executes_at_least text,
  txn text,
  deps text,
  waiting_on text,
  writes text,
  result text,
  participants_owns text,
  participants_touches text,
  participants_has_touched text,
  participants_executes text,
  participants_waits_on text,
  PRIMARY KEY ((command_store_id, txn_id))
);
```
- Data flow: `TxnTable.collect` loads commands via `AccordCommandStore.loadCommand` and formats state.
- MySQL analog: none.

### system_accord_debug.journal
- Spec: Journal entries for command-store transaction changes.
- CQL:
```sql
CREATE TABLE system_accord_debug.journal (
  txn_id text,
  command_store_id int,
  segment bigint,
  segment_position int,
  save_status text,
  route text,
  durability text,
  execute_at text,
  executes_at_least text,
  txn text,
  deps text,
  writes text,
  result text,
  participants_owns text,
  participants_touches text,
  participants_has_touched text,
  participants_executes text,
  participants_waits_on text,
  PRIMARY KEY ((command_store_id, txn_id), segment, segment_position)
);
```
- Data flow: `JournalTable.collect` iterates `AccordCommandStore.debugCommand` entries.
- MySQL analog: none.

### system_accord_debug.txn_ops
- Spec: Write-only table for transaction operations (cleanup, execute, fetch, recover, etc.).
- CQL:
```sql
CREATE TABLE system_accord_debug.txn_ops (
  txn_id text,
  command_store_id int,
  op text,
  PRIMARY KEY (txn_id, command_store_id)
);
```
- Data flow: `TxnOpsTable.applyRowUpdate` executes requested operation against `AccordService`.
- MySQL analog: none.

### system_accord_debug.node_ops
- Spec: Write-only table for node-level Accord operations.
- CQL:
```sql
CREATE TABLE system_accord_debug.node_ops (
  node_id int,
  op text,
  PRIMARY KEY (node_id)
);
```
- Data flow: `NodeOpsTable.applyRowUpdate` calls `AccordOperations` actions.
- MySQL analog: none.

### system_accord_debug.command_store_ops
- Spec: Write-only table for command store operations.
- CQL:
```sql
CREATE TABLE system_accord_debug.command_store_ops (
  command_store_id int,
  op text,
  param text,
  PRIMARY KEY (command_store_id)
);
```
- Data flow: `CommandStoreOpsTable.applyRowUpdate` executes operations (e.g., progress log modes) across command stores.
- MySQL analog: none.

### system_accord_debug.txn_blocked_by
- Spec: Dependency graph of transactions blocking a specified transaction.
- CQL:
```sql
CREATE TABLE system_accord_debug.txn_blocked_by (
  txn_id 'TxnIdUtf8Type',
  command_store_id int,
  depth int,
  blocked_by_key text,
  blocked_by_txn_id 'TxnIdUtf8Type',
  save_status text,
  execute_at text,
  PRIMARY KEY (txn_id, depth, command_store_id, blocked_by_txn_id, blocked_by_key)
);
```
- Data flow: `TxnBlockedByTable.collect` uses `DebugBlockedTxns.visit` for a single transaction.
- MySQL analog: none.

### system_accord_debug.shard_epochs
- Spec: Shard membership by epoch for Accord topology.
- CQL:
```sql
CREATE TABLE system_accord_debug.shard_epochs (
  table_id text,
  token_start 'TokenUtf8Type',
  epoch_start bigint,
  epoch_end bigint,
  peers text,
  peers_fast_path text,
  peers_hard_removed text,
  quorum_simple int,
  quorum_fast int,
  quorum_fast_privileged_deps int,
  quorum_fast_privileged_nodeps int,
  token_end 'TokenUtf8Type',
  PRIMARY KEY (table_id, token_start, epoch_start)
) WITH CLUSTERING ORDER BY (token_start ASC, epoch_start DESC);
```
- Data flow: `ShardEpochsTable.collect` builds ranges from `AccordService` active epochs.
- MySQL analog: none.

## system_accord_debug_remote (virtual keyspace)
- Definition: `src/java/org/apache/cassandra/db/virtual/AccordDebugRemoteKeyspace.java` and `src/java/org/apache/cassandra/db/virtual/RemoteToLocalVirtualTable.java`.
- Notes: Remote view over `system_accord_debug` tables with an added `node_id` partition key; excludes `node_ops`. Original partition key columns become clustering columns, and regular columns are preserved.
- CQL pattern:
```sql
CREATE TABLE system_accord_debug_remote.<table> (
  node_id int,
  -- original partition key columns from system_accord_debug.<table> become clustering columns here
  -- original clustering columns follow
  -- original regular columns are preserved
  PRIMARY KEY ((node_id), <original_pk_columns>, <original_clustering_columns>)
);
```
- Tables: `constants`, `executors`, `coordinations`, `commands_for_key`, `commands_for_key_unmanaged`, `command_store_ops`, `durability_service`, `durable_before`, `executor_cache`, `journal`, `listeners_deps`, `listeners_local`, `max_conflicts`, `migration_state`, `progress_log`, `redundant_before`, `reject_before`, `txn`, `txn_blocked_by`, `txn_ops`, `txn_pattern_trace`, `txn_pattern_traces`, `txn_trace`, `txn_traces`, `shard_epochs`.
- Data flow: `RemoteToLocalVirtualTable.collect` proxies reads to remote nodes via `MessagingService` and merges results.
- MySQL analog: none.
