|
260 | 260 | -type legacy_rpc() :: ?LEGACY_RAFT_RPC(atom(), wa_raft_log:log_term(), node(), undefined | tuple()). |
261 | 261 | -type rpc_named() :: ?RAFT_NAMED_RPC(atom(), wa_raft_log:log_term(), atom(), node(), undefined | tuple()). |
262 | 262 |
|
263 | | --type command() :: legacy_commit_command() | commit_command() | read_command() | status_command() | trigger_election_command() | |
| 263 | +-type command() :: commit_command() | read_command() | status_command() | trigger_election_command() | |
264 | 264 | promote_command() | resign_command() | adjust_membership_command() | refresh_config_command() | |
265 | 265 | snapshot_available_command() | handover_candidates_command() | handover_command() | |
266 | 266 | enable_command() | disable_command() | bootstrap_command() | notify_complete_command(). |
267 | 267 |
|
268 | | --type legacy_commit_command() :: ?LEGACY_COMMIT_COMMAND(gen_server:from(), wa_raft_acceptor:op()). |
269 | 268 | -type commit_command() :: ?COMMIT_COMMAND(gen_server:from(), wa_raft_acceptor:op(), wa_raft_acceptor:priority()). |
270 | 269 | -type read_command() :: ?READ_COMMAND(wa_raft_acceptor:read_op()). |
271 | 270 | -type status_command() :: ?STATUS_COMMAND. |
@@ -1205,8 +1204,6 @@ leader(state_timeout, _, #raft_state{application = App} = State0) -> |
1205 | 1204 | %% of the local node, then immediately apply the commit. Otherwise, if a |
1206 | 1205 | %% handover is not in progress, then immediately append the pending list if |
1207 | 1206 | %% enough pending commit requests have accumulated. |
1208 | | -leader(cast, ?LEGACY_COMMIT_COMMAND(From, Op), State) -> |
1209 | | - ?MODULE:leader(cast, ?COMMIT_COMMAND(From, Op, high), State); |
1210 | 1207 | leader( |
1211 | 1208 | cast, |
1212 | 1209 | ?COMMIT_COMMAND(From, Op, Priority), |
@@ -1947,8 +1944,6 @@ witness(Type, Event, #raft_state{} = State) -> |
1947 | 1944 | ) -> gen_statem:event_handler_result(state(), #raft_state{}). |
1948 | 1945 |
|
1949 | 1946 | %% [Commit] Non-leader nodes should fail commits with {error, not_leader}. |
1950 | | -command(State, cast, ?LEGACY_COMMIT_COMMAND(From, Op), Data) -> |
1951 | | - command(State, cast, ?COMMIT_COMMAND(From, Op, high), Data); |
1952 | 1947 | command( |
1953 | 1948 | State, |
1954 | 1949 | cast, |
|
0 commit comments