Uploaded image for project: 'Spring Data Redis'
  1. Spring Data Redis
  2. DATAREDIS-1178

Scan method on ReactiveSetOperations ignores ScanOptions parameter

    XMLWordPrintable

    Details

    • Sprint:
      2020.0.0 - Ockham M1

      Description

      When using the scan method on ReactiveSetOperations, the overloaded version that takes a ScanOptions parameter does not actually use it hence resulting in ALL of the keys being returned in the set.

      I have tracked down the issue to the following piece of code in DefaultReactiveSetOperations:

      public Flux<V> scan(K key, ScanOptions options) {
      
         // ...
      
        return this.createFlux((connection) -> {
      
         //The "options" variable is not passed into the sScan() method which results in the incorrect overload being called causing a return of all the keys instead of the filtered down ones.
          return connection.sScan(this.rawKey(key)).map(this::readValue);
      
         //The correct line should state:*
         return connection.sScan({color}this.rawKey(key), options).map(this::readValue);{color}
      });
      }
      

       

        Attachments

          Activity

            People

            Assignee:
            cstrobl Christoph Strobl
            Reporter:
            Iluha Iluha
            Last updater:
            Mark Paluch
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: