Skip to content

Commit

Permalink
Merge pull request #752 from Kilowhisky/Fix_750
Browse files Browse the repository at this point in the history
Add 'slave_repl_offset' to the INFO replication command output
  • Loading branch information
tidwall authored Sep 6, 2024
2 parents a953466 + 2451fce commit 2b080f4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/server/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,7 @@ func (s *Server) writeInfoReplication(w *bytes.Buffer) {
fmt.Fprintf(w, "role:slave\r\n")
fmt.Fprintf(w, "master_host:%s\r\n", s.config.followHost())
fmt.Fprintf(w, "master_port:%v\r\n", s.config.followPort())
fmt.Fprintf(w, "slave_repl_offset:%v\r\n", int(s.faofsz))
if s.config.replicaPriority() >= 0 {
fmt.Fprintf(w, "slave_priority:%v\r\n", s.config.replicaPriority())
}
Expand Down

0 comments on commit 2b080f4

Please sign in to comment.