incubator-cassandra-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kirk True <k...@mustardgrain.com>
Subject ConcurrentModificationException on boot
Date Thu, 17 Jan 2013 23:44:46 GMT
Hi all,



A client is using Cassandra 1.2.0 (embedded) into their system. On
startup of one of the nodes in the system, they're seeing a
ConcurrentModificationException:



java.util.ConcurrentModificationException

at java.util.HashMap$HashIterator.nextEntry(HashMap.java:810)

at java.util.HashMap$KeyIterator.next(HashMap.java:845)

at
org.apache.cassandra.dht.BootStrapper.getBootstrapSource(BootStrapper.j
ava:146)

at
org.apache.cassandra.dht.BootStrapper.getBalancedToken(BootStrapper.jav
a:135)

at
org.apache.cassandra.dht.BootStrapper.getBootstrapTokens(BootStrapper.j
ava:115)

at
org.apache.cassandra.service.StorageService.joinTokenRing(StorageServic
e.java:611)

at
org.apache.cassandra.service.StorageService.initServer(StorageService.j
ava:499)

at
org.apache.cassandra.service.StorageService.initServer(StorageService.j
ava:397)

at
org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java
:309)

at
org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.j
ava:397)

at CassandraServer.start(CassandraServer.java:415)



LoadBroadcaster has an internal map named loadInfo that it both
modifies internally as well as makes available via an accessor method
(getLoadInfo).



StorageService.joinTokenRing contains this line (611):



    tokens = BootStrapper.getBootstrapTokens(tokenMetadata,
LoadBroadcaster.instance.getLoadInfo());



So that's how BootStrapper gets access to LoadBroadcaster's loadInfo.



There are a few places where LoadBroadcaster is called by Gossiper to
add and remove nodes which then modifies loadInfo. There's no logging
in many of those places, so it's hard to know which one it is.



Should LoadBroadcaster.instance.getLoadInfo() return a copy of the
internal map rather than just a reference to it?



Thanks,

Kirk

Mime
  • Unnamed multipart/alternative (inline, 7-Bit, 0 bytes)
View raw message