Repository navigation
perf(redis): page keys from a saved scan cursor and send cluster pipelines at once - #4586
Merged
Merged
Conversation
…lines at once Every key browse page scanned the keyspace again from cursor 0, up to 10,000 keys, then sliced the page. A walk per database, MATCH and TYPE now keeps the cursor and the keys seen, so the next page continues from where the last one stopped and paints once the replies hold it; each load is sorted on its own. A cluster pipeline sends its per-node parts concurrently.
datlechin
enabled auto-merge (squash)
November 26, 2026 01:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
RedisKeyBrowseWalk, TableProRedisCore) keeps the cursor and the keys seen so far, once each, per database, MATCH and TYPE.Left for later, in a comment on #4549: sizing the grid's string preview to the cell needs a full-value read when the editor opens a shortened value (today a shortened value cannot be edited inline, so a smaller preview would lock more values); pipelining the next SCAN with a stream batch's reads.
Test plan
RedisKeyBrowseWalkTests(TableProRedisCore): per-load sorting keeps earlier rows, duplicates dropped, continuation and restart rules.RedisKeyBrowsePagingTests(RedisDriverTests): the second page sends one SCAN from the saved cursor (SCAN 0, thenSCAN 7), a page past 10,000 keys is reached, Refresh rescans, a new MATCH starts its own walk, a browse of every key keeps its offset, and an offset atInt.maxdoes not overflow. On main the second page sendsSCAN 0again.RedisClusterChannelTests/pipelinePartsKeepOrder: one part per node, replies in send order.RedisKeyBrowseWalkTestspass locally underswift test. The RedisDriverTests suites run on CI; the local test runner queue was full.verify.sh build RedisDriverand lint pass.Closes #4549