Uploaded image for project: 'Red Hat Data Grid'
  1. Red Hat Data Grid
  2. JDG-7122

[RESP] SDIFFSTORE, SINTERSTORE, SUNIONSTORE should handle non existing key as empty

XMLWordPrintable

      There's a difference between how Infinispan and Redis handle SDIFFSTORE executed with non-existing keys. While Infinispan creates or overrides key with empty key set in Redis the key no longer exists after applying SDIFFSTORE with empty sets.

      The same applies for SINTERSTORE and SUINIONSTORE

      SDIFFSTORE Full test: https://github.com/redis/redis/blob/7.2.5/tests/unit/type/set.tcl#L520-L541
      SINTERSTORE Full test: https://github.com/redis/redis/blob/7.2.5/tests/unit/type/set.tcl#L595-L613
      SUNIONSTORE Full tests: https://github.com/redis/redis/blob/7.2.5/tests/unit/type/set.tcl#L659-L687

      Infinispan:

      127.0.0.1:11222> SDIFFSTORE setrest{t} foo111{t} bar111{t}
      (integer) 0
      127.0.0.1:11222> EXISTS setrest{t}
      (integer) 1
      

      Redis:

      27.0.0.1:6379> SDIFFSTORE setrest{t} foo111{t} bar111{t}
      (integer) 0
      127.0.0.1:6379> EXISTS setrest{t}
      (integer) 0
      

              vrigamon@redhat.com Vittorio Rigamonti
              rhn-support-pdrobek Pavel Drobek
              Pavel Drobek Pavel Drobek
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: