Skip to content

fix(client): incorrect routing for ConfigRewrite and ConfigResetStatistics in cluster mode #493

Description

@currantw

Describe the bug

Two CONFIG commands in GlideClusterClient use explicit routes that differ from glide-core's defaults:

Command C# Route glide-core Default
ConfigRewriteAsync() Route.Random AllNodes
ConfigResetStatisticsAsync() AllPrimaries AllNodes
  • CONFIG REWRITE should persist config on all nodes, not just a random one.
  • CONFIG RESETSTAT should reset statistics on all nodes (replicas have stats too).

Expected Behavior

These commands should rely on glide-core's default routing of AllNodes.

Current Behavior

  • ConfigRewriteAsync() only rewrites config on one random node.
  • ConfigResetStatisticsAsync() only resets stats on primaries, leaving replica stats unchanged.

Possible Solution

Remove the explicit route parameter from both methods so glide-core's correct AllNodes default applies.

Open investigation

ConfigGetAsync(ValkeyValue) routes to AllPrimaries while glide-core defaults to Random. This may be intentional (returns a multi-node view of config) but should be reviewed.

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