Skip to content

Commit b18702d

Browse files
Sarah Hassanfacebook-github-bot
authored andcommitted
only special handle ?SNAPSHOT_AVAILABLE_COMMAND for witnesses when root is undefined
Reviewed By: jaher Differential Revision: D72351629 fbshipit-source-id: c5517786d30d430e446f4d1b4a1d33f2c783617e
1 parent cb0ed2d commit b18702d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wa_raft_server.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1614,7 +1614,7 @@ witness(_Type, ?REMOTE(Sender, ?HANDOVER(Ref, _, _, _)),
16141614
witness(_Type, ?REMOTE(_, ?HANDOVER_FAILED(_)), _State) ->
16151615
keep_state_and_data;
16161616

1617-
witness(Type, ?SNAPSHOT_AVAILABLE_COMMAND(_, #raft_log_pos{index = SnapshotIndex, term = SnapshotTerm} = SnapshotPos),
1617+
witness(Type, ?SNAPSHOT_AVAILABLE_COMMAND(undefined, #raft_log_pos{index = SnapshotIndex, term = SnapshotTerm} = SnapshotPos),
16181618
#raft_state{log_view = View0, name = Name, current_term = CurrentTerm, last_applied = LastApplied} = State0) ->
16191619
case SnapshotIndex > LastApplied orelse LastApplied =:= 0 of
16201620
true ->

0 commit comments

Comments
 (0)