mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-31 20:16:43 +00:00
When a node starts it does not immediately becomes a candidate since it waits to learn about already existing leader and randomize the time it becomes a candidate to prevent dueling candidates if several nodes are started simultaneously. If a cluster consist of only one node there is no point in waiting before becoming a candidate though because two cases above cannot happen. This patch checks that the node belongs to a singleton cluster where the node itself is the only voting member and becomes candidate immediately. This reduces the starting time of a single node cluster which are often used in testing. Message-Id: <YiCbQXx8LPlRQssC@scylladb.com>