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

NPE at com.hazelcast.query.MapIndexService.remove during CONCURRENT_MAP_REMOVE #454

Closed
ib84 opened this issue Apr 5, 2013 · 3 comments

Comments

Projects
None yet
2 participants
@ib84
Copy link

commented Apr 5, 2013

Described several times in this thread:
https://groups.google.com/d/topic/hazelcast/wh_mAChatbk/discussion
and once here:
https://groups.google.com/d/topic/hazelcast/mJCAdfI2L58/discussion

When removing entries on a map for which an index is defined, occasionally this causes exceptions like this:

SEVERE: [192.168.1.2]:5701 [dev] error processing messages packet=Packet [CONCURRENT_MAP_REMOVE] name=c:HGATOMVALUEkeyMap, connection=Connection [/192.168.1.2:52774 -> Address[192.168.1.2]:5702] live=true, client=false, type=MEMBER,blockId=208, keySize=118, valueSize=0 client=false obj=null callId=3140
java.lang.NullPointerException
at com.hazelcast.query.MapIndexService.remove(MapIndexService.java:48)
at com.hazelcast.query.MapIndexService.index(MapIndexService.java:64)
at com.hazelcast.impl.CMap.updateIndexes(CMap.java:1734)
at com.hazelcast.impl.CMap.markAsEvicted(CMap.java:1724)
at com.hazelcast.impl.CMap.markAsRemoved(CMap.java:1705)
at com.hazelcast.impl.CMap.remove(CMap.java:1624)
at com.hazelcast.impl.ConcurrentMapManager$RemoveOperationHandler.doOperation(ConcurrentMapManager.java:2647)
at com.hazelcast.impl.ConcurrentMapManager$RemoveOperationHandler.storeProceed(ConcurrentMapManager.java:2723)
at com.hazelcast.impl.ConcurrentMapManager$RemoveOperationHandler.handle(ConcurrentMapManager.java:2672)
at com.hazelcast.impl.BaseManager$TargetAwareOperationHandler.process(BaseManager.java:292)
at com.hazelcast.cluster.ClusterService.processPacket(ClusterService.java:175)
at com.hazelcast.cluster.ClusterService.dequeuePackets(ClusterService.java:225)
at com.hazelcast.cluster.ClusterService.run(ClusterService.java:190)
at java.lang.Thread.run(Thread.java:722)

@mdogan mdogan closed this in 8ced5ad Apr 26, 2013

@mdogan

This comment has been minimized.

Copy link
Member

commented Apr 26, 2013

This occurs when one node has map index configuration but the other one has not. We always advice use of exactly same configuration on all cluster members.

See https://github.com/hazelcast/hazelcast/blob/master/hazelcast/src/test/java/com/hazelcast/query/QueryTest.java#L1166

@ghost ghost assigned mdogan Apr 26, 2013

@ib84

This comment has been minimized.

Copy link
Author

commented Apr 26, 2013

I disagree. I'm using Executor to execute custom Runnable implementing classes to which I pass the very same MapConfig (containing the MapIndexConfig) as used in the sending client code. In the run Method, i add that MapConfig to Hazelcast in that same way. So the remote node should have the same config. Also, it does work most of the time, but not always. So, I still believe there is a bug.

@mdogan

This comment has been minimized.

Copy link
Member

commented Apr 26, 2013

MapConfig should be set before the first access (in the whole cluster) to the map. If one of the nodes accesses to the map, it will be created by using current configuration on that node. Changing map config after that has no effect.

berkus pushed a commit to berkus/hypergraphdb that referenced this issue Mar 18, 2015

Ingvar.Bogdahn@googlemail.com Ingvar.Bogdahn@googlemail.com
Index/BidirIndex: made hazelcast indexing on keymap and valmap a conf…
…igurable option, now disabled by default. Removing entry on indexed map causes weird hazelcast exceptions hazelcast/hazelcast#454

Made HazelStoreConfig Java-friendly

GoogleCodeExporter pushed a commit to hu198021688500/hypergraphdb that referenced this issue Jun 8, 2015

Ingvar.Bogdahn Ingvar.Bogdahn
Index/BidirIndex: made hazelcast indexing on keymap and valmap a conf…
…igurable option, now disabled by default. Removing entry on indexed map causes weird hazelcast exceptions hazelcast/hazelcast#454

Made HazelStoreConfig Java-friendly

bolerio pushed a commit to bolerio/hgdb that referenced this issue Jul 7, 2015

Ingvar.Bogdahn@googlemail.com Ingvar.Bogdahn@googlemail.com
Index/BidirIndex: made hazelcast indexing on keymap and valmap a conf…
…igurable option, now disabled by default. Removing entry on indexed map causes weird hazelcast exceptions hazelcast/hazelcast#454

Made HazelStoreConfig Java-friendly

git-svn-id: https://hypergraphdb.googlecode.com/svn/trunk@2807 43784a7f-e236-0410-9472-c78ae7dffccf
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.