Skip to content

Commit

Permalink
errors: remove unused variants and metadata error types
Browse files Browse the repository at this point in the history
These are the remnants from the old error handling system - before
MetadataFetchError was introduced.

As we can see, there are no logical errors related to materialized views metadata.
  • Loading branch information
muzarski committed Jan 29, 2025
1 parent 9916c49 commit 1d10e56
Showing 1 changed file with 0 additions and 37 deletions.
37 changes: 0 additions & 37 deletions scylla/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -445,10 +445,6 @@ pub enum MetadataError {
/// Bad tables metadata.
#[error("Bad tables metadata: {0}")]
Tables(#[from] TablesMetadataError),

/// Bad views metadata.
#[error("Bad views metadata: {0}")]
Views(#[from] ViewsMetadataError),
}

/// An error occurred during metadata fetch.
Expand Down Expand Up @@ -487,14 +483,6 @@ pub enum MetadataFetchErrorKind {
#[derive(Error, Debug, Clone)]
#[non_exhaustive]
pub enum PeersMetadataError {
/// system.peers has invalid column type.
#[error("system.peers has invalid column type: {0}")]
SystemPeersInvalidColumnType(TypeCheckError),

/// system.local has invalid column type.
#[error("system.local has invalid column type: {0}")]
SystemLocalInvalidColumnType(TypeCheckError),

/// Empty peers list returned during peers metadata fetch.
#[error("Peers list is empty")]
EmptyPeers,
Expand All @@ -508,10 +496,6 @@ pub enum PeersMetadataError {
#[derive(Error, Debug, Clone)]
#[non_exhaustive]
pub enum KeyspacesMetadataError {
/// system_schema.keyspaces has invalid column type.
#[error("system_schema.keyspaces has invalid column type: {0}")]
SchemaKeyspacesInvalidColumnType(TypeCheckError),

/// Bad keyspace replication strategy.
#[error("Bad keyspace <{keyspace}> replication strategy: {error}")]
Strategy {
Expand Down Expand Up @@ -546,10 +530,6 @@ pub enum KeyspaceStrategyError {
#[derive(Error, Debug, Clone)]
#[non_exhaustive]
pub enum UdtMetadataError {
/// system_schema.types has invalid column type.
#[error("system_schema.types has invalid column type: {0}")]
SchemaTypesInvalidColumnType(TypeCheckError),

/// Failed to parse CQL type returned from system_schema.types query.
#[error(
"Failed to parse a CQL type returned from system_schema.types query. \
Expand All @@ -570,14 +550,6 @@ pub enum UdtMetadataError {
#[derive(Error, Debug, Clone)]
#[non_exhaustive]
pub enum TablesMetadataError {
/// system_schema.tables has invalid column type.
#[error("system_schema.tables has invalid column type: {0}")]
SchemaTablesInvalidColumnType(TypeCheckError),

/// system_schema.columns has invalid column type.
#[error("system_schema.columns has invalid column type: {0}")]
SchemaColumnsInvalidColumnType(TypeCheckError),

/// Failed to parse CQL type returned from system_schema.columns query.
#[error(
"Failed to parse a CQL type returned from system_schema.columns query. \
Expand All @@ -599,15 +571,6 @@ pub enum TablesMetadataError {
},
}

/// An error that occurred during views metadata fetch.
#[derive(Error, Debug, Clone)]
#[non_exhaustive]
pub enum ViewsMetadataError {
/// system_schema.views has invalid column type.
#[error("system_schema.views has invalid column type: {0}")]
SchemaViewsInvalidColumnType(TypeCheckError),
}

/// Error caused by caller creating an invalid query
#[derive(Error, Debug, Clone)]
#[error("Invalid query passed to Session")]
Expand Down

0 comments on commit 1d10e56

Please sign in to comment.