You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Kristen (Jira)" <ji...@apache.org> on 2021/12/21 20:28:00 UTC
[jira] [Commented] (GEODE-9904) RedisSet spop and srandmember should not copy entire MemberSet
[ https://issues.apache.org/jira/browse/GEODE-9904?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17463455#comment-17463455 ]
Kristen commented on GEODE-9904:
--------------------------------
I think this should be deleted since SPOP and SRANDOMMEMBER are still unsupported commands and the implementation can be changed when doing the SPOP Command Support and SRANDOMMEMBER Command Support tasks. I added the information the descriptions of the Jira tasks.
> RedisSet spop and srandmember should not copy entire MemberSet
> --------------------------------------------------------------
>
> Key: GEODE-9904
> URL: https://issues.apache.org/jira/browse/GEODE-9904
> Project: Geode
> Issue Type: Improvement
> Components: redis
> Affects Versions: 1.15.0
> Reporter: Darrel Schneider
> Assignee: Kristen
> Priority: Major
> Labels: release-blocker
>
> 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)