Skip to content

Commit

Permalink
fixup! fixup! Push schema information to workers from admin service o…
Browse files Browse the repository at this point in the history
…n schema changes
  • Loading branch information
tillrohrmann committed Feb 15, 2024
1 parent ec89678 commit 2849b1c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion crates/admin/src/rest_api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ use restate_meta::{FileMetaReader, MetaReader};
use restate_node_services::worker::worker_svc_client::WorkerSvcClient;
use restate_node_services::worker::UpdateSchemaRequest;
use tonic::transport::Channel;
use tracing::debug;

use crate::state::AdminServiceState;

Expand Down Expand Up @@ -119,13 +120,17 @@ async fn notify_worker_about_schema_changes(
.map_err(|err| MetaApiError::Meta(err.into()))?;

// don't fail if the worker is not reachable
let _ = worker_svc_client
let result = worker_svc_client
.update_schemas(UpdateSchemaRequest {
schema_bin: bincode::serde::encode_to_vec(schema_updates, bincode::config::standard())
.map_err(|err| MetaApiError::Generic(err.into()))?
.into(),
})
.await;

if let Err(err) = result {
debug!("Failed notifying worker about schema changes: {err}");
}

Ok(())
}

0 comments on commit 2849b1c

Please sign in to comment.