You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Alex Petrov (JIRA)" <ji...@apache.org> on 2017/01/17 18:40:26 UTC

[jira] [Comment Edited] (CASSANDRA-13075) Indexer is not correctly invoked when building indexes over sstables

    [ https://issues.apache.org/jira/browse/CASSANDRA-13075?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15826571#comment-15826571 ] 

Alex Petrov edited comment on CASSANDRA-13075 at 1/17/17 6:39 PM:
------------------------------------------------------------------

bq. Processing the collected range tombstones 

You're right. I have overlooked the tombstones processing. It was "functioning" correctly, although not passing elements where I expected them. I remember stepping into it with a debugger, so I made the wrong assumption. I've added proper tests for it now. I'll check the paging tomorrow once again to make sure range tombstones won't span across pages. 

This also allowed to address the other two points (additional begin/finish calls along with passing correct rows).

The last point appears to be a github highlighting glitch, since that's all I have changed in my diff view locally:

{code}
         private final DataLimits pageLimits;
-        private final DataLimits.Counter counter;
+        protected final DataLimits.Counter counter;
         private DecoratedKey currentKey;
{code}

 I've updated only trunk patch for now.


was (Author: ifesdjeen):
> Processing the collected range tombstones 

You're right. I have overlooked the tombstones processing. It was "functioning" correctly, although not passing elements where I expected them. I remember stepping into it with a debugger, so I made the wrong assumption. I've added proper tests for it now. I'll check the paging tomorrow once again to make sure range tombstones won't span across pages. 

This also allowed to address the other two points (additional begin/finish calls along with passing correct rows).

The last point appears to be a github highlighting glitch, since that's all I have changed in my diff view locally:

{code}
         private final DataLimits pageLimits;
-        private final DataLimits.Counter counter;
+        protected final DataLimits.Counter counter;
         private DecoratedKey currentKey;
{code}

> Indexer is not correctly invoked when building indexes over sstables
> --------------------------------------------------------------------
>
>                 Key: CASSANDRA-13075
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-13075
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Sergio Bossa
>            Assignee: Alex Petrov
>            Priority: Critical
>         Attachments: CustomIndexTest.java
>
>
> 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 called.
> 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
(v6.3.4#6332)