Merge pull request #752 from Kilowhisky/Fix_750

Add 'slave_repl_offset' to the INFO replication command output
This commit is contained in:
Josh Baker 2024-09-05 18:19:43 -07:00 committed by GitHub
commit 2b080f4aee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -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())
}