Bug 1157390 - Change Size method on Cache to return the contents of the entire cluster
Summary: Change Size method on Cache to return the contents of the entire cluster
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Data Grid 6
Classification: JBoss
Component: Documentation
Version: 6.4.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: GA
: 6.4.0
Assignee: Misha H. Ali
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-27 07:21 UTC by Misha H. Ali
Modified: 2015-01-27 23:44 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-01-27 23:44:21 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker ISPN-4820 0 Major Resolved Change Size method on Cache to return the contents of the entire cluster 2016-10-13 12:27:10 UTC

Description Misha H. Ali 2014-10-27 07:21:42 UTC
Document change

Comment 4 Misha H. Ali 2015-01-08 07:44:18 UTC
Flagging wburns to check if there is an update on this in dev.

Comment 5 William Burns 2015-01-08 13:26:40 UTC
Misha,

The other methods were changed in https://bugzilla.redhat.com/show_bug.cgi?id=1160416.  This issue was isolated to size only.  All methods use the new jvm property to enable the new functionality.

Comment 7 William Burns 2015-01-12 14:24:09 UTC
The default behavior of size, entrySet, values, and keySet methods are not changed in JDG 6.4.

What is changed is if you provide the "infinispan.accurate.bulk.ops" jvm property and set the value to true.  This will change the behavior of the aforementioned methods in a few ways.

1. All of the methods will take into account all of the entries in the entire cluster (not just locally) - this can be overridden using the CACHE_MODE_LOCAL flag.
2. All of the collections returned will now be backing in that updates to the cache and these collections will be seen by each other.  So for example if a user removes a key from the keySet collection it will effectively remove that entry from the cache.
3. Also these methods should have a much lower chance of getting an OOM due to a cache loader having too many entries to store in the node memory at once.  Note that the cache loader can also still be skipped by using the SKIP_CACHE_LOAD flag.

Let me know if you have any other questions or want more clarification.

Comment 9 William Burns 2015-01-15 13:01:35 UTC
Misha,

Looks better, just noticed one thing about the second point you put there.

" If a user removes a key form the keySet collection, its entry is effectively removed from the cache. "

form should be from.

But also this doesn't just affect keySet collection.  I am sorry I was not more specific, but if you modify the keySet, entrySet or values collection it will update through to the Cache as well.  If one of these collections is updated the update will take part of any ongoing transaction as well if there is one.

Also I should mention another thing is that the keySet, entrySet and values collections returned will obey the configured flags from the Cache at the time of invocation.  Meaning that if you retrieve a collection and then later add a new Flag to the Cache the previously retrieved collection will not obey the new Flag, but any subsequently ones will.

Comment 11 William Burns 2015-01-19 13:17:46 UTC
Looks good to me.

Comment 12 Martin Gencur 2015-01-19 16:25:16 UTC
Looks correct.

Comment 13 Misha H. Ali 2015-01-19 20:09:15 UTC
Thanks, Martin.

Comment 14 Martin Gencur 2015-01-20 13:57:03 UTC
Sorry Misha, looks like I was wrong. This topic is not yet correct, according to Tristan's comment 29 on BZ1108446.

Comment 15 Misha H. Ali 2015-01-21 03:57:25 UTC
Thanks, Martin. I'm waiting to see the outcome of the discussion on the RN bug to see what we should change this to.

Comment 16 Misha H. Ali 2015-01-23 05:30:10 UTC
Hi Martin, just to confirm before making any changes: are we good to use the text tristan outlined and everyone (yourself included) approved for the RN here as well?

https://bugzilla.redhat.com/show_bug.cgi?id=1108446#c36

Comment 17 Martin Gencur 2015-01-23 07:39:14 UTC
Yes Misha, the text in Comment 36 in the other BZ is correct. We can use it in RN.

Comment 19 Martin Gencur 2015-01-26 09:40:01 UTC
Looks correct :)


Note You need to log in before you can comment on or make changes to this bug.