[
https://issues.apache.org/jira/browse/ATLAS-3043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16759653#comment-16759653
]
ASF subversion and git services commented on ATLAS-3043:
--------------------------------------------------------
Commit e6951053567d489fcf189a4b443bef3c890c7648 in atlas's branch
refs/heads/branch-1.0 from Madhan Neethiraj
[ https://gitbox.apache.org/repos/asf?p=atlas.git;h=e695105 ]
ATLAS-3043: added unique-attributes constraints at store-level
Change-Id: Ica44b1739b504bebc2ab39dc856ccb079b8f4003
(cherry picked from commit 0e0f217af2b7c142ebc1445b86ba5570a3b69684)
> Unique attributes constraint at store-level
> -------------------------------------------
>
> Key: ATLAS-3043
> URL: https://issues.apache.org/jira/browse/ATLAS-3043
> Project: Atlas
> Issue Type: Bug
> Components: atlas-core
> Reporter: Madhan Neethiraj
> Assignee: Madhan Neethiraj
> Priority: Major
> Fix For: 2.0.0
>
> Attachments: ATLAS-3043.patch
>
>
> 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.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)