Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
acelyc111 committed Oct 27, 2022
1 parent 8c8313a commit f407bdc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
14 changes: 7 additions & 7 deletions src/meta/meta_backup_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ void policy_context::start_backup_app_meta_unlocked(int32_t app_id)
}
CHECK_NOTNULL(remote_file,
"{}: create file({}) succeed, but can't get handle",
_backup_sig.c_str(),
create_file_req.file_name.c_str());
_backup_sig,
create_file_req.file_name);

remote_file->write(
dist::block_service::write_request{buffer},
Expand Down Expand Up @@ -646,7 +646,7 @@ void policy_context::sync_backup_to_remote_storage_unlocked(const backup_info &b
} else {
CHECK(false,
"{}: we can't handle this right now, error({})",
_backup_sig.c_str(),
_backup_sig,
err.to_string());
}
};
Expand Down Expand Up @@ -836,8 +836,8 @@ void policy_context::add_backup_history(const backup_info &info)
_cur_backup.backup_id,
info.backup_id);
CHECK(_backup_history.empty() || info.backup_id > _backup_history.rbegin()->first,
"%s: backup_id(%lld) in history larger than current(%lld)",
_policy.policy_name.c_str(),
"{}: backup_id({}) in history larger than current({})",
_policy.policy_name,
_backup_history.rbegin()->first,
info.backup_id);
_cur_backup = info;
Expand All @@ -851,8 +851,8 @@ void policy_context::add_backup_history(const backup_info &info)
info.start_time_ms,
info.end_time_ms);
CHECK(_cur_backup.end_time_ms == 0 || info.backup_id < _cur_backup.backup_id,
"%s: backup_id(%lld) in history larger than current(%lld)",
_policy.policy_name.c_str(),
"{}: backup_id({}) in history larger than current({})",
_policy.policy_name,
info.backup_id,
_cur_backup.backup_id);

Expand Down
3 changes: 2 additions & 1 deletion src/meta/server_load_balancer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,11 @@ void server_load_balancer::apply_balancer(meta_view view, const migration_list &
configuration_balancer_response resp;
for (auto &pairs : ml) {
register_proposals(view, *pairs.second, resp);
// TODO(yingchun): use dcheck_eq instead
if (resp.err != dsn::ERR_OK) {
const dsn::gpid &pid = pairs.first;
CHECK(false,
"apply balancer for gpid(%d.%d) failed",
"apply balancer for gpid({}.{}) failed",
pid.get_app_id(),
pid.get_partition_index());
}
Expand Down
2 changes: 1 addition & 1 deletion src/shell/command_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -1216,7 +1216,7 @@ get_app_stat(shell_context *sc, const std::string &app_name, std::vector<row_dat
std::string counter_name;
bool parse_ret = parse_app_pegasus_perf_counter_name(
m.name, app_id_x, partition_index_x, counter_name);
CHECK(parse_ret, "name = %s", m.name.c_str());
CHECK(parse_ret, "name = {}", m.name);
dassert(app_id_x == app_id, "name = %s", m.name.c_str());
dassert(partition_index_x < partition_count, "name = %s", m.name.c_str());
if (partitions[partition_index_x].primary != node_addr)
Expand Down

0 comments on commit f407bdc

Please sign in to comment.