Skip to content

Commit

Permalink
fix: for code review
Browse files Browse the repository at this point in the history
  • Loading branch information
wy1433 committed Apr 11, 2024
1 parent 43c805d commit eea7f63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/store/region.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1837,7 +1837,7 @@ void Region::dml_2pc(const pb::StoreReq& request,
// 只有leader有事务情况才能在raft外执行
if (applied_index == 0 && term == 0 && !is_leader()) {
// 非leader才返回
const std::string& leader = butil::endpoint2str(get_leader());
const auto& leader = butil::endpoint2str(get_leader());
response.set_leader(leader.c_str());
response.set_errcode(pb::NOT_LEADER);
response.set_errmsg("not leader");
Expand Down

0 comments on commit eea7f63

Please sign in to comment.