Details
-
Task
-
Resolution: Fixed
-
Major - P3
-
None
-
None
-
Fully Compatible
-
Repl 2020-03-09, Repl 2020-03-23, Repl 2020-04-06
Description
When the primary receives a heartbeat response with a ‘state’ field that is SECONDARY, RECOVERING, or ROLLBACK, it will check if ‘newlyAdded’ is present for the responding node. If ‘newlyAdded’ is present, the primary will initiate a safe reconfig:
- The reconfig will increment the ‘configVersion’ by 1 and remove the corresponding ‘newlyAdded’ field.
- If a concurrent reconfig occurs, it will have a ‘configVersion’ greater than or equal to the one chosen.
- If equal, whichever reconfig came second will error and be forced to retry with a higher ‘configVersion’.
- This reconfig will be on a best-effort basis. If it fails, the reconfig will be retried on the next heartbeat response.
Nodes should log automatic reconfigs they perform.
They should log any errors they receive when performing those reconfigs.