cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Ellis (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (CASSANDRA-731) a few insert operations failed while bootstrapping
Date Wed, 10 Feb 2010 15:57:28 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-731?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jonathan Ellis resolved CASSANDRA-731.
--------------------------------------

    Resolution: Fixed

+1 Jaakko's diagnosis.  Committed assertion removal to 0.5 and trunk.

> a few insert operations failed while bootstrapping
> --------------------------------------------------
>
>                 Key: CASSANDRA-731
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-731
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.5
>            Reporter: david.pan
>            Assignee: Jaakko Laine
>             Fix For: 0.5
>
>         Attachments: 731-throw_internal_exception_while_bootstrapping.patch, the new
log after patch.txt
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> I inserted 10000 key/value while bootstrapping and found 2 insert operations failed.
> DEBUG [pool-1-thread-63] 2010-01-20 17:01:57,033 StorageProxy.java (line 225) insert
writing key 15530 to 10981@/10.81.37.65
> ERROR [pool-1-thread-46] 2010-01-20 17:01:57,033 Cassandra.java (line 1064) Internal
error processing insert
> java.lang.AssertionError
> at org.apache.cassandra.locator.AbstractReplicationStrategy.getHintedMapForEndpoints(AbstractReplicationStrategy.java:157)
> at org.apache.cassandra.locator.AbstractReplicationStrategy.getHintedEndpoints(AbstractReplicationStrategy.java:76)
> at org.apache.cassandra.service.StorageService.getHintedEndpointMap(StorageService.java:1178)
> at org.apache.cassandra.service.StorageProxy.insertBlocking(StorageProxy.java:169)
> at org.apache.cassandra.service.CassandraServer.doInsert(CassandraServer.java:466)
> at org.apache.cassandra.service.CassandraServer.insert(CassandraServer.java:417)
> at org.apache.cassandra.service.Cassandra$Processor$insert.process(Cassandra.java:1056)
> at org.apache.cassandra.service.Cassandra$Processor.process(Cassandra.java:817)
> at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:253)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
> at java.lang.Thread.run(Thread.java:619)
> ERROR [pool-1-thread-44] 2010-01-20 17:01:57,033 Cassandra.java (line 1064) Internal
error processing insert
> java.lang.AssertionError
> at org.apache.cassandra.locator.AbstractReplicationStrategy.getHintedMapForEndpoints(AbstractReplicationStrategy.java:157)
> at org.apache.cassandra.locator.AbstractReplicationStrategy.getHintedEndpoints(AbstractReplicationStrategy.java:76)
> at org.apache.cassandra.service.StorageService.getHintedEndpointMap(StorageService.java:1178)
> at org.apache.cassandra.service.StorageProxy.insertBlocking(StorageProxy.java:169)
> at org.apache.cassandra.service.CassandraServer.doInsert(CassandraServer.java:466)
> at org.apache.cassandra.service.CassandraServer.insert(CassandraServer.java:417)
> at org.apache.cassandra.service.Cassandra$Processor$insert.process(Cassandra.java:1056)
> at org.apache.cassandra.service.Cassandra$Processor.process(Cassandra.java:817)
> at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:253)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
> at java.lang.Thread.run(Thread.java:619)
> I traced the code and found the following assertion failed :
> /* org.apache.cassandra.locator.AbstractReplicationStrategy.getHintedMapForEndpoints(Collection<InetAddress>)
*/
> assert map.size() == targets.size(); 
> The following reasons caused this issue:
> 1) targets is a list , not a map, as a result there may be some duplicated IP.
> 2) The following codes are not atomic :
> org.apache.cassandra.service.StorageService.handleStateNormal(InetAddress, String)
>         tokenMetadata_.updateNormalToken(token, endPoint);
>         calculatePendingRanges();
>  That's to say the IP may be both in the naturalEndpoints and pendingRanges.
> eg : 
> targets is IPa, IPb, IPc, IPa; (size = 4)
> then, the map will be IPa, IPb, IPc. (size = 3)
> as a result, assert failed.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message