Skip to content

fix(client): SelectAsync routes to Random instead of AllNodes in cluster mode #491

Description

@currantw

Describe the bug

GlideClusterClient.SelectAsync explicitly routes to Route.Random, but glide-core's default routing for SELECT is AllNodes. When switching databases in a cluster, all nodes should update their selected database — not just a random one.

Expected Behavior

SELECT should be sent to all nodes (AllNodes) so the database selection is consistent across the cluster.

Current Behavior

Only a single random node receives the SELECT command, leaving other nodes on the previous database.

Possible Solution

Remove the explicit Route.Random parameter from GlideClusterClient.SelectAsync so glide-core's correct AllNodes default applies.

Related

Metadata

Metadata

Assignees

Labels

coreCore library (`sources/Valkey.Glide/`)triageNeeds triage — not yet reviewed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions