Uploaded image for project: 'Ranger'
  1. Ranger
  2. RANGER-1820

Duplicate entries should be deleted before creation of unique index on x_group and x_group_users table

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.5.0, 0.6.0, 0.7.0, 1.0.0
    • 1.0.0, 0.7.2
    • Ranger
    • None

    Description

      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.

      Attachments

        1. RANGER-1820-ranger-0.7.patch
          3 kB
          Pradeep Agrawal
        2. RANGER-1820-master-2.patch
          3 kB
          Pradeep Agrawal
        3. RANGER-1820-1.patch
          49 kB
          Pradeep Agrawal

        Issue Links

          Activity

            People

              pradeep Pradeep Agrawal
              pradeep Pradeep Agrawal
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: