Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-9424

Radish command arguments must support Long values

    XMLWordPrintableJSON

    Details

      Description

      To match the behaviour seen when using native Redis, all command arguments that take integer values (that is, as opposed to float or string) must allow values in the range of Long.MIN_VALUE -> Long.MAX_VALUE.

      Currently, passing a value smaller than Integer.MIN_VALUE or larger than Integer.MAX_VALUE to these commands results in an error being returned, which is not the case for native Redis.

      Currently affected commands are:
      SCAN
      SSCAN
      HSCAN
      SPOP
      SRANDMEMBER
      BITPOS
      GETBIT
      SETBIT
      SETRANGE

      It should be enough to simply parse the argument as a Long and then narrow it to an int in most cases, as internally the maximum value that the argument can possibly take is Integer.MAX_VALUE. For example, the maximum number of elements in a Redis set is 2^32 - 1, so the largest meaningful value for the SSCAN CURSOR argument internally is Integer.MAX_VALUE.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                donalevans Donal Evans
                Reporter:
                donalevans Donal Evans
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: