Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: LFC <[email protected]>
  • Loading branch information
tisonkun and MichaelScofield authored Mar 18, 2024
1 parent 50f2e85 commit 72dac1f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/meta-srv/src/handler/failure_handler/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ impl FailureDetectRunner {
return;
}
Err(err) => {
error!("Failed to check maintenance mode: {}", err);
error!(err; "Failed to check maintenance mode");
return;
}
}
Expand Down
11 changes: 5 additions & 6 deletions src/meta-srv/src/service/admin/maintenance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,12 @@ impl MaintenanceHandler {
err_msg: "'enable' must be 'true' or 'false'",
})?;

let req = PutRequest {
key: Vec::from(MAINTENANCE_KEY),
value: vec![],
prev_kv: false,
};

let response = if enable {
let req = PutRequest {
key: Vec::from(MAINTENANCE_KEY),
value: vec![],
prev_kv: false,
};
self.kv_backend
.put(req.clone())
.await
Expand Down

0 comments on commit 72dac1f

Please sign in to comment.