Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-16752

[RESP] SRANDMEMBER incorrect error message

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      SRANDMEMBER throws an error message that size must be non-negative on out of range value. Which is not correct as it normally accepts negative values:

      Infinispan:

      127.0.0.1:11222> sadd myset a
      (integer) 1
      127.0.0.1:11222> SRANDMEMBER myset -9223372036854775808
      (error) ERR size must be non-negative
      127.0.0.1:11222> SRANDMEMBER myset -1
      1) "a"
      

      Redis:

      127.0.0.1:6379> sadd myset a
      (integer) 1
      127.0.0.1:6379> SRANDMEMBER myset -9223372036854775808
      (error) ERR value is out of range, value must between -9223372036854775807 and 9223372036854775807
      127.0.0.1:6379> SRANDMEMBER myset -1
      1) "a"
      

              vrigamon@redhat.com Vittorio Rigamonti
              vrigamon@redhat.com Vittorio Rigamonti
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: