Skip to content

fix: update correct server mode in parseable.json #1332

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

16 changes: 15 additions & 1 deletion src/storage/store_metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,23 @@ pub async fn resolve_parseable_metadata(
let mut overwrite_remote = false;

let res = match check {
EnvChange::None(metadata) => {
EnvChange::None(mut metadata) => {
// overwrite staging anyways so that it matches remote in case of any divergence
overwrite_staging = true;
match PARSEABLE.options.mode {
Mode::All => {
metadata.server_mode.standalone_after_distributed()?;
overwrite_remote = true;
metadata.server_mode = PARSEABLE.options.mode;
metadata.staging = PARSEABLE.options.staging_dir().to_path_buf();
}
Mode::Query => {
overwrite_remote = true;
metadata.server_mode = PARSEABLE.options.mode;
metadata.staging = PARSEABLE.options.staging_dir().to_path_buf();
}
_=> {}
}
if PARSEABLE.options.mode == Mode::All {
metadata.server_mode.standalone_after_distributed()?;
}
Expand Down
Loading