[
https://issues.apache.org/jira/browse/CASSANDRA-933?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
gabriele renzi updated CASSANDRA-933:
-------------------------------------
Attachment: CASSANDRA-933.patch
simply return empty output on empty input.
> OutOfBoundException in StorageService.getAllRanges
> ---------------------------------------------------
>
> Key: CASSANDRA-933
> URL: https://issues.apache.org/jira/browse/CASSANDRA-933
> Project: Cassandra
> Issue Type: Bug
> Affects Versions: 0.6
> Reporter: gabriele renzi
> Priority: Minor
> Attachments: CASSANDRA-933.patch
>
> Original Estimate: 0.17h
> Remaining Estimate: 0.17h
>
> this was seen on 0.6-beta3 but it appears to be in trunk too, given the same
> code for getAllRanges. The problem appeared while accessing a bootstraping
> node via nodetool, giving the following stacktrace
> Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: -1
> at java.util.ArrayList.get(ArrayList.java:324)
> at java.util.Collections$UnmodifiableList.get(Collections.java:1154)
> at
> org.apache.cassandra.service.StorageService.getAllRanges(StorageService.java:1133)
> at
> org.apache.cassandra.service.StorageService.getRangeToAddressMap(StorageService.java:440)
> at
> org.apache.cassandra.service.StorageService.getRangeToEndPointMap(StorageService.java:431)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:93)
> at
> com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:27)
> at
> com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:208)
> at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:120)
> at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:262)
> at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
> at
> com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
> at
> javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1426)
> ...
> Basically, no test is performed for non-emptyness of the input token list. If
> such list should never be empty, I guess this should be explicit in the
> interface/javadoc, otherwise I'm attaching a patch & testcase (pretty silly
> code, but the test passes :) )
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.