diff --git a/CHANGELOG.md b/CHANGELOG.md index de0f2ddf..207fe2c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [1.29.1] = 2022-09-21 + +### Fixed +- fe180dc: Fix follower not authenticating after aofshink + ## [1.29.0] = 2022-07-14 ### Added diff --git a/internal/server/checksum.go b/internal/server/checksum.go index 2cf2ab8d..3538be2b 100644 --- a/internal/server/checksum.go +++ b/internal/server/checksum.go @@ -138,7 +138,8 @@ func getEndOfLastValuePositionInFile(fname string, startPos int64) (int64, error // followCheckSome is not a full checksum. It just "checks some" data. // We will do some various checksums on the leader until we find the correct position to start at. -func (s *Server) followCheckSome(addr string, followc int) (pos int64, err error) { +func (s *Server) followCheckSome(addr string, followc int, auth string, +) (pos int64, err error) { if core.ShowDebugMessages { log.Debug("follow:", addr, ":check some") } @@ -157,6 +158,12 @@ func (s *Server) followCheckSome(addr string, followc int) (pos int64, err error } defer conn.Close() + if auth != "" { + if err := s.followDoLeaderAuth(conn, auth); err != nil { + return 0, err + } + } + min := int64(0) max := int64(s.aofsz) - checksumsz limit := int64(s.aofsz) diff --git a/internal/server/follow.go b/internal/server/follow.go index 8367e2fd..3b2a6772 100644 --- a/internal/server/follow.go +++ b/internal/server/follow.go @@ -224,7 +224,7 @@ func (s *Server) followStep(host string, port int, followc int) error { } // verify checksum - pos, err := s.followCheckSome(addr, followc) + pos, err := s.followCheckSome(addr, followc, auth) if err != nil { return err }