mirror of https://github.com/tidwall/tile38.git
Merge fix follower auth fix
This commit is contained in:
commit
a452d45a1e
|
@ -2,6 +2,11 @@
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
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
|
## [1.29.0] = 2022-07-14
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
|
@ -138,7 +138,8 @@ func getEndOfLastValuePositionInFile(fname string, startPos int64) (int64, error
|
||||||
|
|
||||||
// followCheckSome is not a full checksum. It just "checks some" data.
|
// 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.
|
// 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 {
|
if core.ShowDebugMessages {
|
||||||
log.Debug("follow:", addr, ":check some")
|
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()
|
defer conn.Close()
|
||||||
|
|
||||||
|
if auth != "" {
|
||||||
|
if err := s.followDoLeaderAuth(conn, auth); err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
min := int64(0)
|
min := int64(0)
|
||||||
max := int64(s.aofsz) - checksumsz
|
max := int64(s.aofsz) - checksumsz
|
||||||
limit := int64(s.aofsz)
|
limit := int64(s.aofsz)
|
||||||
|
|
|
@ -224,7 +224,7 @@ func (s *Server) followStep(host string, port int, followc int) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify checksum
|
// verify checksum
|
||||||
pos, err := s.followCheckSome(addr, followc)
|
pos, err := s.followCheckSome(addr, followc, auth)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue