diff --git a/scylla/src/client/session.rs b/scylla/src/client/session.rs index 17b7807c6..7e0dec001 100644 --- a/scylla/src/client/session.rs +++ b/scylla/src/client/session.rs @@ -15,8 +15,8 @@ use crate::cluster::node::CloudEndpoint; use crate::cluster::node::{InternalKnownNode, KnownNode, NodeRef}; use crate::cluster::{Cluster, ClusterNeatDebug, ClusterState}; use crate::errors::{ - BadQuery, NewSessionError, ProtocolError, QueryError, RequestAttemptError, RequestError, - TracingProtocolError, + BadQuery, MetadataError, NewSessionError, ProtocolError, QueryError, RequestAttemptError, + RequestError, TracingProtocolError, }; use crate::frame::response::result; #[cfg(feature = "ssl")] @@ -1710,7 +1710,7 @@ where /// /// Normally this is not needed, /// the driver should automatically detect all metadata changes in the cluster - pub async fn refresh_metadata(&self) -> Result<(), QueryError> { + pub async fn refresh_metadata(&self) -> Result<(), MetadataError> { self.cluster.refresh_metadata().await } diff --git a/scylla/src/cluster/worker.rs b/scylla/src/cluster/worker.rs index 3dab166fc..133b81f44 100644 --- a/scylla/src/cluster/worker.rs +++ b/scylla/src/cluster/worker.rs @@ -1,5 +1,5 @@ use crate::client::session::TABLET_CHANNEL_SIZE; -use crate::errors::{NewSessionError, QueryError}; +use crate::errors::{MetadataError, NewSessionError, QueryError}; use crate::frame::response::event::{Event, StatusChangeEvent}; use crate::network::{PoolConfig, VerifiedKeyspaceName}; use crate::policies::host_filter::HostFilter; @@ -95,7 +95,7 @@ struct ClusterWorker { #[derive(Debug)] struct RefreshRequest { - response_chan: tokio::sync::oneshot::Sender>, + response_chan: tokio::sync::oneshot::Sender>, } #[derive(Debug)] @@ -182,7 +182,7 @@ impl Cluster { self.data.load_full() } - pub(crate) async fn refresh_metadata(&self) -> Result<(), QueryError> { + pub(crate) async fn refresh_metadata(&self) -> Result<(), MetadataError> { let (response_sender, response_receiver) = tokio::sync::oneshot::channel(); self.refresh_channel @@ -401,7 +401,7 @@ impl ClusterWorker { use_keyspace_result(use_keyspace_results.into_iter()) } - async fn perform_refresh(&mut self) -> Result<(), QueryError> { + async fn perform_refresh(&mut self) -> Result<(), MetadataError> { // Read latest Metadata let metadata = self.metadata_reader.read_metadata(false).await?; let cluster_data: Arc = self.cluster_data.load_full();