leekeiabstraction commented on code in PR #102:
URL: https://github.com/apache/fluss-rust/pull/102#discussion_r2645652388
##########
crates/fluss/src/client/metadata.rs:
##########
@@ -65,7 +78,22 @@ impl Metadata {
}
pub async fn update_tables_metadata(&self, table_paths:
&HashSet<&TablePath>) -> Result<()> {
- let server = self.cluster.read().get_one_available_server().clone();
+ let maybe_server = {
+ let guard = self.cluster.read();
+ guard.get_one_available_server().cloned()
+ };
+
+ let server = match maybe_server {
+ Some(s) => s,
+ None => {
+ info!(
+ "No available tablet server to update metadata, attempting
to re-initialize cluster using bootstrap server."
+ );
+ self.reinit_cluster().await?;
+ return Ok(());
Review Comment:
This is fine as we are running in a loop on both Scanner and Sender,
subsequent iteration will call update_tables_metadata again
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]