Skip to content

Commit c316646

Browse files
Jose-Angel Herrero Bajofacebook-github-bot
authored andcommitted
Remove disable catchup through snapshot transfer functionality (we never used this in 4 years)
Summary: as tilte Reviewed By: SarahDesouky Differential Revision: D82555691 fbshipit-source-id: beffc0ab409b98286f7c75f8390deaaab95ea973
1 parent 55f6937 commit c316646

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

include/wa_raft.hrl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,9 +257,6 @@
257257
(?RAFT_APP_CONFIG(App, ?RAFT_LOG_HEARTBEAT_BINARY_ENTRIES, false) =:= true)
258258
).
259259

260-
%% Whether or not the RAFT server should use any special catchup strategy to bring peers back in sync.
261-
-define(RAFT_CATCHUP_ENABLED, raft_catchup_enabled).
262-
-define(RAFT_CATCHUP_ENABLED(App), (?RAFT_APP_CONFIG(App, {?RAFT_CATCHUP_ENABLED, catchup_enabled}, true) =/= false)).
263260
%% Minimum number of log entries after which RAFT servers should use bulk logs catchup to bring peers
264261
%% back into sync if enabled.
265262
-define(RAFT_CATCHUP_THRESHOLD, raft_catchup_threshold).

src/wa_raft_server.erl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3473,12 +3473,9 @@ select_follower_replication_mode(
34733473
last_applied = LastAppliedIndex
34743474
}
34753475
) ->
3476-
CatchupEnabled = ?RAFT_CATCHUP_ENABLED(App),
34773476
BulkLogThreshold = ?RAFT_CATCHUP_THRESHOLD(App),
34783477
LeaderFirstIndex = wa_raft_log:first_index(View),
34793478
if
3480-
% If catchup modes are not enabled, then always replicate using logs.
3481-
not CatchupEnabled -> logs;
34823479
% Snapshot is required if the follower is stalled or we are missing
34833480
% the logs required for incremental replication.
34843481
FollowerLastIndex =:= 0 -> snapshot;

0 commit comments

Comments
 (0)