You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/07/01 00:05:05 UTC

[jira] [Commented] (TRAFODION-14) upsert or merge into a table with indexes can result in inconsistency between index and table

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

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

GitHub user selvaganesang opened a pull request:

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

    Changes related to JIRA [TRAFODION-14]

    upsert or merge into a table with indexes can result in
    inconsistency between index and table
    
    The change is to pass the recent row timestamp to the Delete
    operator. However, this may not solve the above issue because
    tombstone marker timestamp can be same or later than the
    recently added row even with this change.
    
    This change is pushed for the following reasons:
    a) To enable Trafodion async operation concept for the merge
       operation
    b) To optimize delete operation by removing unwanted memory
       allocation.

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

    $ git pull https://github.com/selvaganesang/incubator-trafodion master

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

    https://github.com/apache/incubator-trafodion/pull/15.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 #15
    
----
commit 960b8609fe94ad1c7d354545fde0dcafc81e6cbf
Author: selvaganesang <se...@hp.com>
Date:   2015-06-30T21:11:52Z

    Changes related to JIRA [TRAFODION-14]
    
    upsert or merge into a table with indexes can result in
    inconsistency between index and table
    
    The change is to pass the recent row timestamp to the Delete
    operator. However, this may not solve the above issue because
    tombstone marker timestamp can be same or later than the
    recently added row even with this change.
    
    This change is pushed for the following reasons:
    a) To enable Trafodion async operation concept for the merge
       operation
    b) To optimize delete operation by removing unwanted memory
       allocation.

----


> upsert or merge into a table with indexes can result in inconsistency between index and table
> ---------------------------------------------------------------------------------------------
>
>                 Key: TRAFODION-14
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-14
>             Project: Apache Trafodion
>          Issue Type: Bug
>            Reporter: Selvaganesan
>            Priority: Critical
>
> Steps to reproduce this problem
> set schema seabase ;
> CREATE TABLE TRAFODION.SEABASE.TEST1
>   (
>     A                                INT NO DEFAULT NOT NULL NOT DROPPABLE
>   , B                                INT DEFAULT NULL
>   , PRIMARY KEY (A ASC)
>   ) 
> ;
> CREATE INDEX IDX1 ON TRAFODION.SEABASE.TEST1
>   (
>     B ASC
>   )
> ;
> CREATE TABLE TRAFODION.SEABASE.TEST2
>   (
>     A                                INT NO DEFAULT NOT NULL NOT DROPPABLE
>   , B                                INT DEFAULT NULL
>   , PRIMARY KEY (A ASC)
>   ) 
> ;
> insert into test2 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10) ;
> prepare s2 from upsert into test1 select * from test2;
> 1) execute s2;
> 2) select * from test1 ;
> If you repeat steps 1 and 2 more than once, at times fewer than 10 rows are selected from the step 2.
> In this particular case select * from test1 involves index scan plan.



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