anchor.diff:      handle_call({enable_auto_failover, Timeout, Max, []}, From, State);
   %% @doc Auto-failover isn't enabled yet (tick_ref isn't set).
   handle_call({enable_auto_failover, Timeout, Max, Extras}, _From,
  -            #state{tick_ref=nil}=State) ->
  +            #state{tick_ref = nil} = State) ->
       1 = Max,
       ale:info(?USER_LOGGER, "Enabled auto-failover with timeout ~p", [Timeout]),
       {ok, Ref} = timer2:send_interval(get_tick_period(), tick),
  -    State2 = State#state{tick_ref=Ref, timeout=Timeout,
  -                         auto_failover_logic_state=init_logic_state(Timeout)},
  +    State2 = State#state{tick_ref = Ref, timeout = Timeout,
  +                         auto_failover_logic_state = init_logic_state(Timeout)},
       make_state_persistent(State2, Extras),
       {reply, ok, State2};
   %% @doc Auto-failover is already enabled, just update the settings.
  
positive.code:     not(element(Flag, State)).
  
  init_reported(State) ->
      State#state{reported_autofailover_unsafe=false,
                  reported_max_reached=false,
                  reported_rebalance_running=false,
                  reported_in_recovery=false}.
  
  update_reported_flags(NewState0, UpdatedState) ->
      Flags = [#state.reported_autofailover_unsafe,
  
negative.code:           auto_failover_logic_state,
            %% Reference to the ns_tick_event. If it is nil, auto-failover is
            %% disabled.
            tick_ref = nil :: nil | timer:tref(),
            %% Time a node needs to be down until it is automatically failovered
            timeout = nil :: nil | integer(),
            %% Counts the number of nodes that were already auto-failovered
            count = 0 :: non_neg_integer(),
  
            %% Whether we reported to the user autofailover_unsafe condition
            reported_autofailover_unsafe = false :: boolean(),
            %% Whether we reported that max number of auto failovers was reached
            reported_max_reached = false :: boolean(),
            %% Whether we reported that we could not auto failover because of
            %% rebalance
            reported_rebalance_running = false :: boolean(),
            %% Whether we reported that we could not auto failover because of
            %% recovery mode
            reported_in_recovery = false :: boolean()
           }).
  
  %%
  