Consider a custom KeyspaceTokenMap implementation for EverywhereStrategy

Description

EverywhereStrategy is trivial: every token replicates to every replica, and every replica owns every token. We only need the list of replicas and the list of tokens to answer token map queries, there's no need to precompute the results like for other strategies.

Notes:

  • one limitation is that primary replicas will not appear first in TokenMap.getReplicas. But the API contract doesn't say that they should, it's just a consequence of how other strategies are implemented. Also, the current implementation of EverywhereStrategy doesn't do it either.

  • this ticket is very low priority if we implement and filter out system keyspaces by default. I doubt any application would explicitly reenable the three DSE system keyspaces that use EverywhereStrategy.

Environment

None

Pull Requests

None

Assignee

Unassigned

Reporter

Olivier Michallat

Labels

None

PM Priority

None

Affects versions

None

Fix versions

Pull Request

None

Doc Impact

None

Size

None

External issue ID

None

External issue ID

None

Epic Link

Priority

Minor
Configure