Skip to content

Commit

Permalink
Flush config file to disk before starting Restate process
Browse files Browse the repository at this point in the history
Dropping the file alone, does not guarantee that the file content is
written to disk and the file being closed immediately. If the config
file is not written when starting the Restate process, then it will
start with the default configuration which causes the raft_metadata_cluster_chaos_test
to fail every now and then.

This fixes #2828.
  • Loading branch information
tillrohrmann committed Mar 10, 2025
1 parent 14f71bb commit ce72e47
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/local-cluster-runner/src/node/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,10 @@ impl Node {
.write_all(config_dump.as_bytes())
.await
.map_err(NodeStartError::CreateConfig)?;
config_file
.flush()
.await
.map_err(NodeStartError::CreateConfig)?;
}

let node_log_filename = node_base_dir.join("restate.log");
Expand Down

0 comments on commit ce72e47

Please sign in to comment.