Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add doc-comments for new metadata sub-modules
  • Loading branch information
Lorak-mmk committed Jan 8, 2026
commit fd72f91d5e73216bf40543defac60cc4597efcab
16 changes: 16 additions & 0 deletions scylla/src/cluster/metadata/fetching.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
//! Metadata fetching and processing module.
//!
//! This module is responsible for querying cluster metadata from the control connection,
//! including information about peers (nodes in the cluster), keyspaces, tables, views,
//! and user-defined types (UDTs).
//!
//! The main entry point is [`ControlConnection::query_metadata`], which fetches all
//! metadata needed to maintain an up-to-date view of the cluster topology and schema.
//!
//! Key functionality includes:
//! - Querying peer information from `system.peers` and `system.local` tables
//! - Fetching keyspace metadata including replication strategies
//! - Loading table and materialized view schemas from `system_schema` tables
//! - Processing user-defined types with proper dependency resolution via topological sort
//! - Parsing CQL type strings into structured type representations

use std::borrow::BorrowMut;
use std::cell::Cell;
use std::collections::HashMap;
Expand Down
15 changes: 15 additions & 0 deletions scylla/src/cluster/metadata/reader.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
//! This module contains the [`MetadataReader`] struct, which is responsible for
//! fetching and maintaining cluster metadata through a control connection.
//!
//! The control connection is a dedicated connection to one of the cluster nodes
//! that is used to:
//! - Fetch cluster metadata (topology, schema, token ring information)
//! - Receive server-side events (topology changes, schema changes, status changes)
//!
//! [`MetadataReader`] handles control connection lifecycle, including:
//! - Initial connection establishment to contact points
//! - Automatic reconnection to other known peers on connection failure
//! - Fallback to initial contact points when all known peers are unreachable
//! - Host filtering to ensure the control connection is established to an accepted node
//!

use std::sync::Arc;
use std::time::Duration;

Expand Down
Loading