cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Petrov (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-13075) Indexer is not correctly invoked when building indexes over sstables
Date Mon, 09 Jan 2017 13:38:58 GMT


Alex Petrov commented on CASSANDRA-13075:

Yes, sorry, I understood that although didn't have a chance to post my findings here.

I've written a simple test that would test different partitions (with/without static rows,
different page size: more/less than items in partition), but was unable to reproduce the issue
(that we keep calling {{begin}} / {{end}} even after the paging iterator has been exhausted.
Could you help me to reproduce it? It might be looking like it, especially if you check for
whether or not it was exhausted before actual paging took place. You'd need to check after
the `try` block to be sure.

{{partitionDelete}} isn't called, you're absolutely right here, and we should address this

Do you see these things as two separate issues? 

> Indexer is not correctly invoked when building indexes over sstables
> --------------------------------------------------------------------
>                 Key: CASSANDRA-13075
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Sergio Bossa
>            Assignee: Alex Petrov
>            Priority: Critical
> Following CASSANDRA-12796, {{SecondaryIndexManager#indexPartition()}} calls each {{Indexer}}
{{begin}} and {{finish}} methods multiple times per partition (depending on the page size),
as {{PartitionIterators#getOnlyElement()}} returns an empty partition even when the iterator
is exhausted.
> This leads to bugs for {{Indexer}} implementations doing actual work in those  methods,
but even worse, it provides the {{Indexer}} the same input of an empty partition containing
only a non-live partition deletion, as the {{Indexer#partitionDelete()}} method is *not* actually
> My proposed solution:
> 1) Stop the iteration before the empty partition is returned and ingested into the {{Indexer}}.
> 2) Actually call the {{Indexer#partitionDelete()}} method inside {{SecondaryIndexManager#indexPartition()}}
(which requires to use a filtered iterator so it actually contains the deletion info).

This message was sent by Atlassian JIRA

View raw message