Uploaded image for project: 'Sentry (Retired)'
  1. Sentry (Retired)
  2. SENTRY-1913

Incorrect constraints on AUTHZ_PATHS_MAPPING.AUTHZ_OBJ_NAME

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • None
    • 2.0.0
    • None
    • None

    Description

      SENTRY-1365 introduced the following constraint:

      -- Constraints for table `AUTHZ_PATHS_MAPPING` for class(es) [org.apache.sentry.provider.db.service.model.MAuthzPathsMapping]
      CREATE UNIQUE INDEX `AUTHZOBJNAME` ON `AUTHZ_PATHS_MAPPING` (`AUTHZ_OBJ_NAME`);
      

      Later (SENTRY-1805) we added snapshot generation (AUTHZ_SNAPSHOT_ID). What should be unique is the combination. of object name and snapshot ID.

      Here, for some reason HMSFollower decided to create a new full snapshot while there was one present. And it couldn't do that because of the duplicate entry - it couldn't write the same object with a different ID.

      Sop we should change the UNIQUE to be on two fields

      Attachments

        1. SENTRY-1913.01-master.patch
          12 kB
          Vamsee K. Yarlagadda
        2. SENTRY-1913.02-master.patch
          13 kB
          Vamsee K. Yarlagadda
        3. SENTRY-1913.03-master.patch
          12 kB
          Vamsee K. Yarlagadda

        Issue Links

          Activity

            People

              vamsee Vamsee K. Yarlagadda
              akolb Alex Kolbasov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 48h
                  48h
                  Remaining:
                  Remaining Estimate - 48h
                  48h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified