[JBoss JIRA] (ISPN-2575) KeyTransformer registration is required on all nodes of the cluster, in case of custom keys
by Mircea Markus (JIRA)
[ https://issues.jboss.org/browse/ISPN-2575?page=com.atlassian.jira.plugin.... ]
Mircea Markus updated ISPN-2575:
--------------------------------
Assignee: Adrian Nistor (was: Sanne Grinovero)
> KeyTransformer registration is required on all nodes of the cluster, in case of custom keys
> -------------------------------------------------------------------------------------------
>
> Key: ISPN-2575
> URL: https://issues.jboss.org/browse/ISPN-2575
> Project: Infinispan
> Issue Type: Enhancement
> Components: Querying
> Affects Versions: 5.2.0.Beta5
> Reporter: Anna Manukyan
> Assignee: Adrian Nistor
> Attachments: ClusteredCacheTest.java
>
>
> The case is the following:
> I have a clustered cache on which I want to perform a search. I'm doing the following:
> I'm initializing SearchManager on node1, I'm registering a custom key transformer for my key using the created searchmanager, but then when I'm trying to put data into the cache on node1 (which is in REPL_SYNC mode with cache on node2), I'm getting the exception:
> java.lang.IllegalArgumentException: Indexing only works with entries keyed on Strings, primitives and classes that have the @Transformable annotation - you passed in a class org.infinispan.query.test.CustomKey3. Alternatively, see org.infinispan.query.SearchManager#registerKeyTransformer
> When I'm initializing the SearchManager using node2 cache and register the keyTransformer on it as well, then everything works perfectly, even though I am not using the second created SearchManager.
> The test which reproduces the issue is attached to the jira. Please see the test case: testSearchKeyTransformer()
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
1 week, 1 day
[JBoss JIRA] (ISPN-7157) NPE possible in cache eviction 'HIR_NONRESIDENT'
by Elias Ross (JIRA)
Elias Ross created ISPN-7157:
--------------------------------
Summary: NPE possible in cache eviction 'HIR_NONRESIDENT'
Key: ISPN-7157
URL: https://issues.jboss.org/browse/ISPN-7157
Project: Infinispan
Issue Type: Bug
Components: Core
Affects Versions: 8.2.2.Final
Reporter: Elias Ross
Observed the following:
java.lang.NullPointerException: null
at org.infinispan.commons.util.concurrent.jdk8backported.BoundedEquivalentConcurrentHashMapV8$LIRSEvictionPolicy.findIfEntriesNeedEvicting(BoundedEquivalentConcurrentHashMapV8.java:1531) ~[org.infinispan-infinispan-commons-8.2.2.Final.jar:8.2.2.Final]
at org.infinispan.commons.util.concurrent.jdk8backported.BoundedEquivalentConcurrentHashMapV8.compute(BoundedEquivalentConcurrentHashMapV8.java:3657) ~[org.infinispan-infinispan-commons-8.2.2.Final.jar:8.2.2.Final]
at org.infinispan.container.DefaultDataContainer.put(DefaultDataContainer.java:227) ~[org.infinispan-infinispan-core-8.2.2.Final.jar:8.2.2.Final]
at org.infinispan.container.entries.ReadCommittedEntry.commit(ReadCommittedEntry.java:168) ~[org.infinispan-infinispan-core-8.2.2.Final.jar:8.2.2.Final]
at org.infinispan.statetransfer.CommitManager.commit(CommitManager.java:100) ~[org.infinispan-infinispan-core-8.2.2.Final.jar:8.2.2.Final]
at org.infinispan.interceptors.locking.ClusteringDependentLogic$LocalLogic.commitSingleEntry(ClusteringDependentLogic.java:299) ~[org.infinispan-infinispan-core-8.2.2.Final.jar:8.2.2.Final]
at org.infinispan.interceptors.locking.ClusteringDependentLogic$AbstractClusteringDependentLogic.commitEntry(ClusteringDependentLogic.java:115) ~[org.infinispan-infinispan-core-8.2.2.Final.jar:8.2.2.Final]
at org.infinispan.interceptors.EntryWrappingInterceptor.commitContextEntry(EntryWrappingInterceptor.java:479) ~[org.infinispan-infinispan-core-8.2.2.Final.jar:8.2.2.Final]
at org.infinispan.interceptors.EntryWrappingInterceptor.commitEntryIfNeeded(EntryWrappingInterceptor.java:655) ~[org.infinispan-infinispan-core-8.2.2.Final.jar:8.2.2.Final]
at org.infinispan.interceptors.EntryWrappingInterceptor.commitContextEntries(EntryWrappingInterceptor.java:456) ~[org.infinispan-infinispan-core-8.2.2.Final.jar:8.2.2.Final]
at org.infinispan.interceptors.EntryWrappingInterceptor.invokeNextAndApplyChanges(EntryWrappingInterceptor.java:530) ~[org.infinispan-infinispan-core-8.2.2.Final.jar:8.2.2.Final]
...
I think the cause is this code:
} else if (evict.state == Recency.HIR_NONRESIDENT) {
Node<K, V> node = f.find(hash, evict.getKey());
V prevValue = node.val;
^^^ node can be null here
if (prevValue != NULL_VALUE) {
node.val = (V) NULL_VALUE;
map.addCount(-1, -1);
This is 8.2.2
In 8.2.x the code is:
} else if (evict.state == Recency.HIR_NONRESIDENT) {
BoundedEquivalentConcurrentHashMapV8.Node<K, V> node = f.find(hash, evict.getKey());
V prevValue = node.val;
^^^ node can be null here
if (prevValue != BoundedEquivalentConcurrentHashMapV8.NULL_VALUE) {
node.val = (V) BoundedEquivalentConcurrentHashMapV8.NULL_VALUE;
Solution would be to check for null values here.
--
This message was sent by Atlassian JIRA
(v7.2.2#72004)
8 years, 12 months