Skip to content

Ensure raft ID uniqueness #253

@aaronlehmann

Description

@aaronlehmann

Currently, raft IDs are randomly generated on the client side before joining the cluster. If the ID it generates collides with an ID that's already in use, this is not handled gracefully.

There are two ways I can see to handle this properly:

  • Generate raft IDs on the server side: Have the Join RPC call to respond with a valid ID. This either requires that Join requests are forwarded to the leader, or that Join retries proposing a configuration change until one gets committed with an ID that doesn't conflict with anything else in the log. The logic around this could be a bit complex.
  • Continue to generate the ID client-side, but have the Join RPC call return an error if the ID is not unique (after the ProposeConfChange raft round). Have the client retry with a different ID.

cc @abronan

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions