You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by "Pradeep Agrawal (JIRA)" <ji...@apache.org> on 2017/10/18 16:52:00 UTC

[jira] [Updated] (RANGER-1820) Duplicate entries should be deleted before creation of unique index on x_group and x_group_users table

     [ https://issues.apache.org/jira/browse/RANGER-1820?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pradeep Agrawal updated RANGER-1820:
------------------------------------
    Attachment: RANGER-1820-ranger-0.7.patch
                RANGER-1820-master-2.patch

> Duplicate entries should be deleted before creation of unique index on x_group and x_group_users table
> ------------------------------------------------------------------------------------------------------
>
>                 Key: RANGER-1820
>                 URL: https://issues.apache.org/jira/browse/RANGER-1820
>             Project: Ranger
>          Issue Type: Bug
>          Components: Ranger
>    Affects Versions: 0.5.0, 0.6.0, 0.7.0, 1.0.0
>            Reporter: Pradeep Agrawal
>            Assignee: Pradeep Agrawal
>             Fix For: 1.0.0, 0.7.2
>
>         Attachments: RANGER-1820-1.patch, RANGER-1820-master-2.patch, RANGER-1820-ranger-0.7.patch
>
>
> Currently, concurrent request to create a group and group-users mapping is causing duplicate entries of the same group in the x_group table and user-group mapping entry in the x_group_users table. Duplicate entry creation has been restricted through the RANGER-1765 patch which creates unique constraints on the x_group and x_group_users table. But unique index creation may fail if there is already duplicate entries(likely to happen in upgrade case) so we should delete duplicate entries of these tables before creating the unique index. If the reference of duplicate group id is being used in child table then the id of the duplicate group shall be updated in the child table. In case of duplicate entries of the same group name; group name having the minimum id(created first) shall be given higher preference and will not be deleted from the x_group table.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)