[
https://issues.apache.org/jira/browse/RANGER-1820?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16209831#comment-16209831
]
Pradeep Agrawal commented on RANGER-1820:
-----------------------------------------
Committed in Apache master:
https://github.com/apache/ranger/commit/97280ee10f8cb1c624e348227fc696adffa731ce
Committed in Apache ranger-0.7 :
https://github.com/apache/ranger/commit/d3527546f10c514cc0b4069d7d830bf46e8726f8
> 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)