tile38 icon indicating copy to clipboard operation
tile38 copied to clipboard

Following a new leader should abort current load of the AOF

Open Kilowhisky opened this issue 1 year ago • 0 comments

Describe the bug If I start up a server that has a (large) AOF on disk and then immediately tell the server to FOLLOW a new leader. The server responds with an error that its currently loading the AOF and cannot accept the request. I have to wait for the AOF to be fully loaded before I can tell it to FOLLOW a new leader.

To Reproduce

  1. Startup server and insert large set of data in order to grow the AOF.
  2. Startup a secondary server and more or less leave it empty.
  3. Restart the first server and while its busy trying to load the AOF, instruct it to FOLLOW the second server.
  4. Watch it complain about not being able to complete the request.

Expected behavior I would expect certain commands to immediately stop the AOF loading as they make it pointless.

  1. FLUSHDB
  2. FOLLOW

Operating System (please complete the following information):

  • OS: Linux
  • CPU: amd64
  • Version: 1.30.0 (edge)
  • Container: Docker

Kilowhisky avatar Jun 22 '23 16:06 Kilowhisky