[ https://issues.apache.org/jira/browse/GEODE-9834?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17480222#comment-17480222 ]
ASF subversion and git services commented on GEODE-9834: -------------------------------------------------------- Commit a53c6da8dad75c8953de7e7ceb4bbfa545e5f405 in geode's branch refs/heads/develop from Kris10 [ https://gitbox.apache.org/repos/asf?p=geode.git;h=a53c6da ] GEODE-9834: SRANDMEMBER Command Support (#7228) > SRANDMEMBER Command Supported > ----------------------------- > > Key: GEODE-9834 > URL: https://issues.apache.org/jira/browse/GEODE-9834 > Project: Geode > Issue Type: Improvement > Components: redis > Reporter: Wayne > Assignee: Kristen > Priority: Major > Labels: pull-request-available > > The SRANDMEMBER command has been implemented but lacks sufficient testing to > ensure that the implementation is robust and does not regress in the future. > > Write unit/integration tests that run against both Geode Redis and native > Redis, and dunit tests which test multiple concurrent clients accessing > different servers. > > +Acceptance Criteria+ > > Passing Unit/integration tests for both Geode and native Redis. The > RedisCommandType class and > README/redis_api_for_[geode.html.md.erb|http://geode.html.md.erb/] updated to > make command "supported". Stories in the backlog to fix the identified issues > (with JIRA tickets) and problem tests that are ignored should be fixed and > enabled. > > The current implementation of RedisSet spop and srandmember always copy the > entire MemberSet. So if you have a redis set with a million items, and than > ask for one random one, instead of it reading just one of the items out of > the set it first copies the entire set. > The call that makes the copy is "members.toArray". It should be pretty easy > to add spop and srandmember support to the MemberSet super class. Since > MemberSet uses a flat array to store its items it should work well with > supporting indexing of its array to get a random element. -- This message was sent by Atlassian Jira (v8.20.1#820001)