Skip to content

fix: prevent shard skip in ListActors when SCAN returns oversized batch#328

Open
Mesut Oezdil (mesutoezdil) wants to merge 1 commit into
agent-substrate:mainfrom
mesutoezdil:fix/listactors-shard-skip
Open

fix: prevent shard skip in ListActors when SCAN returns oversized batch#328
Mesut Oezdil (mesutoezdil) wants to merge 1 commit into
agent-substrate:mainfrom
mesutoezdil:fix/listactors-shard-skip

Conversation

@mesutoezdil

@mesutoezdil Mesut Oezdil (mesutoezdil) commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Redis SCAN COUNT is a hint and not a cap.
When SCAN returns more keys than remaining and cursor reaches 0 in the same call, the outer loop advances to the next shard where remaining<=0 triggers immediately.
The next-token then points to the shard after that, permanently skipping one shard's actors from all subsequent pages.
Fix: set stop=true when cursor==0 and result is already at or over pageSize.

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.

1 participant