[DATAREDIS-635] Implement Cluster SCAN support for Lettuce Created: 25/Apr/17  Updated: 13/Apr/18  Resolved: 16/Mar/18

Status: Closed
Project: Spring Data Redis
Component/s: Lettuce Driver
Affects Version/s: None
Fix Version/s: 2.1 M2 (Lovelace)

Type: Task Priority: Minor
Reporter: Mark Paluch Assignee: Mark Paluch
Resolution: Complete Votes: 1
Labels: lovelace
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Last updater: Mark Paluch
Pull Request URL: https://github.com/spring-projects/spring-data-redis/pull/296
Sprint: Lovelace M1, Lovelace M2 / M3


Lettuce supports SCAN within the cluster by reusing KeyScanCursor from the previous SCAN invocation. Lettuce maintains internally a scan state that is performed across all known master nodes:

KeyScanCursor<String> scanCursor = null;

do {
    if (scanCursor == null) {
        scanCursor = sync.scan();
    } else {
        scanCursor = sync.scan(scanCursor);
} while (!scanCursor.isFinished());

Generated at Sat Nov 23 01:59:16 UTC 2019 using Jira 7.13.8#713008-sha1:1606a5c1e7006e1ab135aac81f7a9566b2dbc3a6.