You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2018/07/31 16:06:00 UTC

[jira] [Commented] (ASTERIXDB-2429) Primary Key Index is not properly maintained by upsert feeds

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

ASF subversion and git services commented on ASTERIXDB-2429:
------------------------------------------------------------

Commit a691dd422cfee860779d71f1e7dbde528660aebc in asterixdb's branch refs/heads/master from luochen01
[ https://git-wip-us.apache.org/repos/asf?p=asterixdb.git;h=a691dd4 ]

[ASTERIXDB-2429] Fix the upsert of primary key index

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Previously the primary key index is not properly maintained during
upsert. Since there is no secondary key in the primary key index, the
old value would always point to the primary key, which is always equal
to the new value. As a result, the primary key index is nevered
maintainined during upsert.
- This patch fixes this bug with two changes:
First, if there is a primary key index, we would perform upsert anyway
no matter whether old value == new value
Second, use a boolean variable to indicate whether the operation
is upsert or delete since for the primary key index, old value cannot
provide such information.

Change-Id: I925bd42ba67f70e94f5f5bc2d24151c8e2e20baf
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2825
Sonar-Qube: Jenkins <je...@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
Contrib: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: abdullah alamoudi <ba...@gmail.com>


> Primary Key Index is not properly maintained by upsert feeds
> ------------------------------------------------------------
>
>                 Key: ASTERIXDB-2429
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-2429
>             Project: Apache AsterixDB
>          Issue Type: Bug
>          Components: ING - Ingestion, STO - Storage
>            Reporter: Chen Luo
>            Assignee: Chen Luo
>            Priority: Major
>
> During upsert, the primary key index is not properly maintained and is always empty. The problem is that when upserting secondary indexes, we generate new values and old values to clean up secondaries. However, since there is no secondary key for the primary key index, the old value would always points to the new primary key. As a result, LSMSecondaryUpsertOperator would always think the secondary key values do not change, ignoring maintaining the primary key index.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)