diff --git a/src/braft/replicator.cpp b/src/braft/replicator.cpp index f63a3083..788277ca 100644 --- a/src/braft/replicator.cpp +++ b/src/braft/replicator.cpp @@ -320,7 +320,7 @@ void Replicator::_on_heartbeat_returned( << ", group " << r->_options.group_id; butil::Status status; status.set_error(EHIGHERTERMRESPONSE, "Leader receives higher term " - "hearbeat_response from peer:%s", r->_options.peer_id.to_string().c_str()); + "heartbeat_response from peer:%s", r->_options.peer_id.to_string().c_str()); r->_destroy(); node_impl->increase_term_to(response->term(), status); node_impl->Release(); @@ -888,7 +888,7 @@ void Replicator::_on_install_snapshot_returned( succ = false; ss << " fail."; LOG(INFO) << ss.str(); - // Let hearbeat do step down + // Let heartbeat do step down break; } // Success diff --git a/src/braft/replicator.h b/src/braft/replicator.h index 9bdf380e..97c1ef5d 100644 --- a/src/braft/replicator.h +++ b/src/braft/replicator.h @@ -141,7 +141,7 @@ class BAIDU_CACHELINE_ALIGNMENT Replicator { int _prepare_entry(int offset, EntryMeta* em, butil::IOBuf* data); void _wait_more_entries(); - void _send_empty_entries(bool is_hearbeat); + void _send_empty_entries(bool is_heartbeat); void _send_entries(); void _notify_on_caught_up(int error_code, bool); int _fill_common_fields(AppendEntriesRequest* request, int64_t prev_log_index,