Skip to content

Commit

Permalink
Merge pull request #466 from rabbitmq/md/receive-snapshot-calls-queries
Browse files Browse the repository at this point in the history
  • Loading branch information
the-mikedavis authored Sep 4, 2024
2 parents 6a80882 + 529da9d commit ddc99a3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/ra_server_proc.erl
Original file line number Diff line number Diff line change
Expand Up @@ -857,6 +857,18 @@ receive_snapshot(enter, OldState, State0 = #state{conf = Conf}) ->
| Actions]};
receive_snapshot(_, tick_timeout, State0) ->
{keep_state, State0, set_tick_timer(State0, [])};
receive_snapshot({call, From}, {leader_call, Msg}, State) ->
maybe_redirect(From, Msg, State);
receive_snapshot(EventType, {local_call, Msg}, State) ->
receive_snapshot(EventType, Msg, State);
receive_snapshot({call, _From} = EventType, {local_query, QueryFun}, State) ->
receive_snapshot(EventType, {local_query, QueryFun, #{}}, State);
receive_snapshot({call, From}, {local_query, QueryFun, Options}, State) ->
perform_or_delay_local_query(
receive_snapshot, From, QueryFun, Options, State);
receive_snapshot({call, From}, {state_query, Spec}, State) ->
Reply = {ok, do_state_query(Spec, State), id(State)},
{keep_state, State, [{reply, From, Reply}]};
receive_snapshot(EventType, Msg, State0) ->
case handle_receive_snapshot(Msg, State0) of
{receive_snapshot, State1, Effects} ->
Expand Down

0 comments on commit ddc99a3

Please sign in to comment.