[
https://issues.apache.org/jira/browse/GEODE-9424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17381514#comment-17381514
]
ASF subversion and git services commented on GEODE-9424:
--------------------------------------------------------
Commit 970497912dec5af43605842195bc8a7dd1479851 in geode's branch
refs/heads/develop from Donal Evans
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=9704979 ]
GEODE-9424: Accept Long arguments for Redis commands (#6698)
- Do not return errors when arguments are specified that are less than
Integer.MIN_VALUE or less than Integer.MAX_VALE
- Convert long arguments outside the above range to Integer.MIN_VALUE
or Integer.MAX_VALUE to be used internally
- Add tests for new Coder method and coverage for existing supported
commands that take integer arguments, except HSCAN which will require
GEODE-9429 to be fixed first
Authored-by: Donal Evans <[email protected]>
> Radish command arguments must support Long values
> -------------------------------------------------
>
> Key: GEODE-9424
> URL: https://issues.apache.org/jira/browse/GEODE-9424
> Project: Geode
> Issue Type: Bug
> Components: redis
> Affects Versions: 1.15.0
> Reporter: Donal Evans
> Assignee: Donal Evans
> Priority: Major
> Labels: pull-request-available
>
> 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|https://redis.io/topics/data-types#sets], so the largest meaningful value
> for the SSCAN CURSOR argument internally is {{Integer.MAX_VALUE}}.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)