[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 Jul 11 05:53:08 UTC 2020 using Jira 8.5.4#805004-sha1:0444eab799707f9ad7b248d69f858774aadfd250.