Raft options are not respected

Open
#1,326 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
go

Research direction

Start by tracing how ClusterSpec's RaftConfig is passed into the running Raft configuration. Check the handling of SnapshotInterval, KeepOldSnapshots, and LogEntriesForSlowFollowers, then add coverage showing those values are applied; done means these options affect snapshot and follower-log behavior as configured.

Written by the indexing model from the issue text.

Description

area/raft

ClusterSpec has a RaftConfig message with a number of parameters:

        // SnapshotInterval is the number of log entries between snapshots.
        uint64 snapshot_interval = 1;
        // KeepOldSnapshots is the number of snapshots to keep beyond the
        // current snapshot.
        uint64 keep_old_snapshots = 2;
        // LogEntriesForSlowFollowers is the number of log entries to keep
        // around to sync up slow followers after a snapshot is created.
        uint64 log_entries_for_slow_followers = 3;
        // HeartbeatTick defines the amount of ticks (in seconds) between
        // each heartbeat message sent to other members for health-check.
        uint32 heartbeat_tick = 4;
        // ElectionTick defines the amount of ticks (in seconds) needed
        // without a leader to trigger a new election.
        uint32 election_tick = 5;

It doesn't look like any of these parameters are respected. HeartbeatTick and ElectionTick are hard to change once the cluster is already running, but the other options shouldn't be difficult to support.

Dominant language
Go
Stars
3.7k
Forks
676
Avg merge
4d 9h
Merged PRs (30d)
6

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from moby/swarmkit

All issues in moby/swarmkit

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.