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

ASF GitHub Bot commented on TRAFODION-40:
-----------------------------------------

GitHub user zellerh opened a pull request:

    https://github.com/apache/incubator-trafodion/pull/34

    TRAFODION-40 Make index-maintenance delete conditional

    This fixes the issue where we update an indexed column to itself, and
    the index maintenance tree both deletes and re-inserts the index row
    within the same millisecond. This makes the index row disappear, as the
    delete takes precedence over the insert, even though it happened earlier.
    
    As a side-effect, index maintenance may get faster, because we are
    also replacing the CheckAndPut of the index insert with a Put.
    We could further improve this by processing multiple Puts together.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/zellerh/incubator-trafodion bug/udf1

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-trafodion/pull/34.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #34
    
----
commit 7801e6a200ebef7b0794d4749c38b73c14b28be6
Author: Hans Zeller <[email protected]>
Date:   2015-07-29T16:06:06Z

    TRAFODION-40 Make index-maintenance delete conditional
    
    This fixes the issue where we update an indexed column to itself, and
    the index maintenance tree both deletes and re-inserts the index row
    within the same millisecond. This makes the index row disappear, as the
    delete takes precedence over the insert, even though it happened earlier.
    
    As a side-effect, index maintenance may get faster, because we are
    also replacing the CheckAndPut of the index insert with a Put.
    We could further improve this by processing multiple Puts together.

----


> Compiler work to allow a conditional delete
> -------------------------------------------
>
>                 Key: TRAFODION-40
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-40
>             Project: Apache Trafodion
>          Issue Type: Sub-task
>            Reporter: Hans Zeller
>
> Part of TRAFODION-14.
> Selva and Suresh found that we sometimes miss index rows. This is causes if 
> all of the following happen: a) we perform index maintenance for an update 
> (delete of the old index row, followed by insert of the new row), b) the old 
> and new row of the index have the same row key, i.e. we didn't change the 
> column values in the index and c) the HBase timestamp is the same for the 
> index delete and the update (delete and insert happen in the same 
> millisecond).
> Selva suggested to solutions:
> 1. Determine the max. timestamp of the old row and use that timestamp for the 
> delete. That would work (unlikely someone did an insert in a different 
> statement in the same millisecond), but it would require reading the value 
> before an index delete.
> 2. Add a new expression for the index delete (could also do it for the 
> insert) that skips the delete if old and new index values match.
> We want to go with solution 2., since it has the better performance. I'm 
> filing this JIRA for the necessary compiler work,



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to