[
https://issues.apache.org/jira/browse/RANGER-1820?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Pradeep Agrawal reopened RANGER-1820:
-------------------------------------
Re-opening this issue as an entry of new SQL patch 029 need to be added in
optimized SQL server script as well.
> 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
>
>
> 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)