Skip to content

fix: short-circuit scan/scan_each to empty in cluster mode - #252

Merged
Aryex merged 1 commit into
release-1.0from
alexl/scan-cluster-empty-guard
Aug 7, 2026
Merged

fix: short-circuit scan/scan_each to empty in cluster mode#252
Aryex merged 1 commit into
release-1.0from
alexl/scan-cluster-empty-guard

Conversation

@Aryex

@Aryex Aryex commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

scan and scan_each are standalone mode only. This PR adds additional comments clarifications. It also return empty results if scan is used on cluster_mode.

Cluster support to be added in #133

Test plan

  • bundle exec rubocop lib/valkey/commands/generic_commands.rb test/lint/generic_commands.rb — clean
  • ruby -c on both files — syntax OK
  • bundle exec rake test:standalone — deferred (no local standalone server up at the time of push); please verify in CI
  • bundle exec rake test:cluster — deferred (no local cluster up at the time of push); the new cluster_mode? branches in test_scan / test_scan_each are what exercises the guard, so CI is the load-bearing check here

@Aryex
Aryex force-pushed the alexl/scan-cluster-empty-guard branch from afa567e to 07454c1 Compare August 7, 2026 21:44
@Aryex
Aryex requested a review from jamesx-improving August 7, 2026 21:47
@Aryex
Aryex force-pushed the alexl/scan-cluster-empty-guard branch from 07454c1 to 5833ba7 Compare August 7, 2026 21:48
Signed-off-by: Alex Le <alex.le@improving.com>
@Aryex
Aryex force-pushed the alexl/scan-cluster-empty-guard branch from 5833ba7 to 9831339 Compare August 7, 2026 21:53
@Aryex
Aryex changed the base branch from main to release-1.0 August 7, 2026 21:53
@Aryex
Aryex marked this pull request as ready for review August 7, 2026 21:58

@jamesx-improving jamesx-improving left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yipin-chen yipin-chen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. nit: Should we remove TODO in the comment and just keep issue links?

@Aryex
Aryex merged commit 346824f into release-1.0 Aug 7, 2026
23 of 24 checks passed
@Aryex
Aryex deleted the alexl/scan-cluster-empty-guard branch August 7, 2026 22:28
@Aryex Aryex mentioned this pull request Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants