Hotfix replica sync needs flushing
This commit is contained in:
parent
dfcdeb7a51
commit
4c3ac62191
@ -129,6 +129,9 @@ func (c *Server) followHandleCommand(args []string, followc int, w io.Writer) (i
|
||||
if err := c.writeAOF(args, &d); err != nil {
|
||||
return c.aofsz, err
|
||||
}
|
||||
if len(c.aofbuf) > 10240 {
|
||||
c.flushAOF()
|
||||
}
|
||||
return c.aofsz, nil
|
||||
}
|
||||
|
||||
@ -238,6 +241,7 @@ func (c *Server) followStep(host string, port int, followc int) error {
|
||||
if aofsz >= int(aofSize) {
|
||||
caughtUp = true
|
||||
c.mu.Lock()
|
||||
c.flushAOF()
|
||||
c.fcup = true
|
||||
c.fcuponce = true
|
||||
c.mu.Unlock()
|
||||
|
Loading…
x
Reference in New Issue
Block a user