[jira] [Updated] (CASSANDRA-6498) Null pointer exception in custom secondary indexes

2014-01-15 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-6498:
--

 Priority: Minor  (was: Major)
Fix Version/s: 2.1

> Null pointer exception in custom secondary indexes
> --
>
> Key: CASSANDRA-6498
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6498
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Andrés de la Peña
>Assignee: Miguel Angel Fernandez Diaz
>Priority: Minor
>  Labels: 2i, secondaryIndex, secondary_index
> Fix For: 2.1
>
> Attachments: CASSANDRA-6498.patch
>
>
> StorageProxy#estimateResultRowsPerRange raises a null pointer exception when 
> using a custom 2i implementation that not uses a column family as underlying 
> storage:
> {code}
> resultRowsPerRange = highestSelectivityIndex.getIndexCfs().getMeanColumns();
> {code}
> According to the documentation, the method SecondaryIndex#getIndexCfs should 
> return null when no column family is used.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)


[jira] [Updated] (CASSANDRA-6498) Null pointer exception in custom secondary indexes

2014-01-14 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-6498:
--

Reviewer: Sam Tunnicliffe

WDYT [~beobal]?

> Null pointer exception in custom secondary indexes
> --
>
> Key: CASSANDRA-6498
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6498
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Andrés de la Peña
>  Labels: 2i, secondaryIndex, secondary_index
> Attachments: CASSANDRA-6498.patch
>
>
> StorageProxy#estimateResultRowsPerRange raises a null pointer exception when 
> using a custom 2i implementation that not uses a column family as underlying 
> storage:
> {code}
> resultRowsPerRange = highestSelectivityIndex.getIndexCfs().getMeanColumns();
> {code}
> According to the documentation, the method SecondaryIndex#getIndexCfs should 
> return null when no column family is used.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)


[jira] [Updated] (CASSANDRA-6498) Null pointer exception in custom secondary indexes

2014-01-14 Thread Miguel Angel Fernandez Diaz (JIRA)

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

Miguel Angel Fernandez Diaz updated CASSANDRA-6498:
---

Attachment: CASSANDRA-6498.patch

In order to avoid this null pointer exception, we shouldn't assume that 
highestSelectivityIndex (which is a SecondaryIndex) has a IndexCfs because that 
depends on the implementation type.
 
Therefore, a nice way to solve this issue would be to include an abstract 
method in the SecondaryIndex class, add a implementation of the method where we 
really know there is a IndexCfs and otherwise delegate the implementation of 
this method to those who are creating a custom 2i.

I submit a patch that implements this solution.

> Null pointer exception in custom secondary indexes
> --
>
> Key: CASSANDRA-6498
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6498
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Andrés de la Peña
>  Labels: 2i, secondaryIndex, secondary_index
> Attachments: CASSANDRA-6498.patch
>
>
> StorageProxy#estimateResultRowsPerRange raises a null pointer exception when 
> using a custom 2i implementation that not uses a column family as underlying 
> storage:
> {code}
> resultRowsPerRange = highestSelectivityIndex.getIndexCfs().getMeanColumns();
> {code}
> According to the documentation, the method SecondaryIndex#getIndexCfs should 
> return null when no column family is used.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)