Uploaded image for project: 'Atlas'
  1. Atlas
  2. ATLAS-3043

Unique attributes constraint at store-level

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.0.0
    • atlas-core
    • None

    Description

      Atlas data-model allows marking an attribute as unique; and on entity create/update operations, Atlas verifies that this constraint is not violated i.e. no more than one active entity of a given entity-type can have same value for a unique-attribute.

      However, no store-level constraint is created to enforce uniqueness. This is likely to be due to the fact that there can be multiple deleted entities with the same typeName & unique-attribute value. And having such store-level constraint wouldn't allow this to exist.

      An alternate approach is to create a 'shadow-property' at the store-level for the unique-attribute; and this property should be set only for active entities. When an entity is deleted, this 'shadow-property' will be removed from the entity-vertex. In this approach, the unique-constraint can be set at the store level for the 'shadow-property'. In addition to enforcing the constraint at the store level, it might also help in quicker entity-retrieval given typeName and unique-attribute.

      Attachments

        1. ATLAS-3043.patch
          26 kB
          Madhan Neethiraj

        Issue Links

          Activity

            People

              madhan Madhan Neethiraj
              madhan Madhan Neethiraj
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: