Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IMap.keySet() fetches both keys and values #4642

Closed
jerrinot opened this issue Feb 19, 2015 · 4 comments

Comments

Projects
None yet
6 participants
@jerrinot
Copy link
Contributor

commented Feb 19, 2015

keySet() relies on QueryOperation. The QueryOperation doesn't accept IterationType - it always returns both keys & values. This can lead to unnecessary load and potentially even OOM.

It's especially painful when values are larger than keys.

kudos to @Donnerbart for pointing this out!

@pveentjer

This comment has been minimized.

Copy link
Member

commented Feb 19, 2015

Is this also an issue with map.values? So you are only interested in values, but do you get the keys as well?

@gurbuzali

This comment has been minimized.

Copy link
Member

commented Feb 19, 2015

@ahmetmircik

This comment has been minimized.

Copy link
Member

commented Feb 19, 2015

good point @Donnerbart 👍

@metanet metanet added Team: Core and removed Team: Core labels Mar 3, 2015

@ahmetmircik ahmetmircik added this to the 3.5 milestone Mar 18, 2015

@gurbuzali gurbuzali modified the milestones: 3.6, 3.5 May 12, 2015

@Donnerbart

This comment has been minimized.

Copy link
Contributor

commented Jun 30, 2015

I will close this one in favor of #5634, since it has some test code.

@Donnerbart Donnerbart closed this Jun 30, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.