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

hazelcast IMap ignores size capacity #188

Closed
Eeugen opened this issue Jun 13, 2012 · 1 comment

Comments

Projects
None yet
2 participants
@Eeugen
Copy link

commented Jun 13, 2012

I'm trying to use distributed map (IMap) for temporary caching;
have a unit test with following relevant presets:

  • TtimeToLive - is set to 10seconds
  • cache size: 20
  • max size policy: cluster_wide_map_size

the IMap is being populated only via MapLoader.loadAll(Kyes)
i.e i never perform operations like put/putIfAbsent directly in IMap, so basically the IMap caches whatever it finds in my persistence layer.

issue:
The problem is using this approach the cache size is being ignored. I easily got IMap to store >60 entries.

workaround:
performing IMap.puts will keep size under 20 as expected.

is there a way to perform something like IMap.ensureSize() ?

  • version 2.1.2

thx
Eugen

@Eeugen

This comment has been minimized.

Copy link
Author

commented Jun 28, 2012

noticed weird behavior, at some point only 1 node has the entire set of elements (i.e there is no distribution)
i would randomly kill nodes, but the entire set is being copied from one node to another without being distributed.
will try today later with an older version of hazelcast.

wonder could this be related to the MapLoader.load issue i pointed above...

@enesakar enesakar closed this in 381413e Aug 13, 2012

@ghost ghost assigned enesakar Aug 14, 2012

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.