Browse Source

Error if coordinator doesn't reply properly

Instead of sending `CoordinatorStopped`.

This should make it easier to debug when a reply is not sent as expected.
tags/v0.3.12-rc0
Philipp Oppermann 9 months ago
parent
commit
c9a720d7ae
Failed to extract signature
2 changed files with 3 additions and 3 deletions
  1. +2
    -2
      binaries/coordinator/src/control.rs
  2. +1
    -1
      libraries/message/src/cli_to_coordinator.rs

+ 2
- 2
binaries/coordinator/src/control.rs View File

@@ -155,7 +155,7 @@ async fn handle_request(
) -> eyre::Result<ControlRequestReply> {
let (reply_tx, reply_rx) = oneshot::channel();
let event = ControlEvent::IncomingRequest {
request,
request: request.clone(),
reply_sender: reply_tx,
};

@@ -165,7 +165,7 @@ async fn handle_request(

reply_rx
.await
.unwrap_or(Ok(ControlRequestReply::CoordinatorStopped))
.wrap_err_with(|| format!("no coordinator reply to {request:?}"))?
}

#[derive(Debug)]


+ 1
- 1
libraries/message/src/cli_to_coordinator.rs View File

@@ -7,7 +7,7 @@ use crate::{
id::{NodeId, OperatorId},
};

#[derive(Debug, serde::Deserialize, serde::Serialize)]
#[derive(Debug, Clone, serde::Deserialize, serde::Serialize)]
pub enum ControlRequest {
Start {
dataflow: Descriptor,


Loading…
Cancel
Save