Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coordinator stopped on bad control command #650

Merged
merged 5 commits into from
Sep 11, 2024

Conversation

Hennzau
Copy link
Collaborator

@Hennzau Hennzau commented Sep 10, 2024

Fix #648 and more

@Hennzau Hennzau linked an issue Sep 10, 2024 that may be closed by this pull request
@Hennzau Hennzau force-pushed the 648-coordinator-crashes-on-bad-logs-access branch from 9f12f03 to ed35332 Compare September 10, 2024 16:06
@Hennzau Hennzau force-pushed the 648-coordinator-crashes-on-bad-logs-access branch from 343f7d7 to 01fa7b8 Compare September 11, 2024 06:58
@Hennzau Hennzau marked this pull request as ready for review September 11, 2024 12:49
@Hennzau Hennzau enabled auto-merge (squash) September 11, 2024 12:50
@Hennzau Hennzau requested a review from haixuanTao September 11, 2024 12:50
Copy link
Collaborator

@haixuanTao haixuanTao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall :)

Thanks!

dataflow,
uuid,
for dataflow_uuid in running_dataflows.keys().cloned().collect::<Vec<_>>() {
let _ = stop_dataflow(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need to change the stop_dataflow return type if we are not using it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are using it in the control loop for dora stop but not for the dora destroy command. But its more readable if we don't have 2 different functions to do that.

let dataflow = stop_dataflow(
    &mut running_dataflows,
    dataflow_uuid,
    &mut daemon_connections,
    clock.new_timestamp(),
    grace_duration,
)
.await;

match dataflow {
    Ok(dataflow) => {
        dataflow.reply_senders.push(reply_sender);
    }
    Err(err) => {
        let _ = reply_sender.send(Err(err));
    }
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok make sense! Thanks!

@Hennzau Hennzau merged commit 232d72a into main Sep 11, 2024
40 checks passed
@Hennzau Hennzau deleted the 648-coordinator-crashes-on-bad-logs-access branch September 11, 2024 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

coordinator crashes on bad logs access
2 participants