frankgh opened a new pull request #1376:
URL: https://github.com/apache/cassandra/pull/1376
This commit introduces two main features:
1. The ability to provide a custom implementation of the
`StartupConnectivityChecker`
2. The `ConsistencyLevelStartupConnectivityChecker` checker
In `cassandra.yaml`, a custom implementation of the
`StartupConnectivityChecker` can be
specified by providing the fully qualified class name by setting the
`startup_connectivity_checker`
property in the yaml file. Additionally, the property supports the existing
implementation
of the checker: `StrictStartupConnectivityChecker` (the default); and a new
implementation
of the checker called the `ConsistencyLevelStartupConnectivityChecker`.
The current implementation of the `StartupConnectivityChecker` (the default)
ensures that
all-but-one peers in each datacenter are available during Cassandra startup.
We call this
implementation the strict implementation
(`StrictStartupConnectivityChecker`). It is a
strict implemetation because it requires all-but-one of the peers are
available during
cluster startup.
The Consistency Level Considered implementation of the checker borrows the
concept of the
`ConsistencyLevel` to determine the number of peer connections required
during startup.
The lowest non-zero replication factor among all user keyspaces is used to
determine the
quorum.
The checker breaks the check into 2 phases:
1. In phase one, it checks if the primary set of peers has connected.
2. In phase two, if primary peers have not yet responded then it sends
additional ping messages
to the rest of the peers and checks if the connected peers can satisfy
the specified
consistency level.
The checker supports the following values for `ConsistencyLevel`:
- ALL: all peers are required for the checks
- QUORUM: primary peers required for quorum are used for the checks
- LOCAL_QUORUM: primary peers in the local DC required for local quorum are
used for the checks
- EACH_QUORUM: quorum in each DC is required for the primary peers
The default consistency level is `LOCAL_QUORUM` and this value can be
configured in
`cassandra.yaml` by specifying the `block_for_peers_consistency_level`
property. The
checker reuses the original `block_for_peers_timeout_in_secs` property to
determine
how long the node will wait to connect to other peers.
The cheker only supports the `NetworkTopologyStrategy`. The checker is not
suitable
when using vnodes.
Co-authored-by: Yifan Cai <[email protected]>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]