Skip to content

Commit

Permalink
Add master_repl_offset in INFO command output (apache#374)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShooterIT committed Nov 2, 2021
1 parent fff2d5f commit d75b95c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,7 @@ void Server::GetReplicationInfo(std::string *info) {
++idx;
}
slave_threads_mu_.unlock();
string_stream << "master_repl_offset:" << latest_seq << "\r\n";

*info = string_stream.str();
}
Expand Down
2 changes: 1 addition & 1 deletion tests/tcl/tests/support/util.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ proc wait_for_sync r {

proc wait_for_ofs_sync {r1 r2} {
wait_for_condition 50 100 {
[status $r1 sequence] eq [status $r2 sequence]
[status $r1 master_repl_offset] eq [status $r2 master_repl_offset]
} else {
fail "replica didn't sync in time"
}
Expand Down

0 comments on commit d75b95c

Please sign in to comment.