[
https://issues.apache.org/jira/browse/ATLAS-1743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15978541#comment-15978541
]
David Radley commented on ATLAS-1743:
-------------------------------------
Hi there,
[~ayubkhan]I agree this is how Atlas is designed. Though it does not seem
quite right to me. See my review comment on https://reviews.apache.org/r/58333/.
It seems that post should not be used for update. I suspect [~ssainath]
expected the rest post to be a create only; as per normal Rest conventions. The
confusion is that Atlas is exposing non standard Rest behavior. all the best,
David
I suggest the design is changed so that posts are only for create. Then creates
with the same unique attributes should probably be rejected (though for big
graphs this check could imply a big search - that would hit performance). This
would be the normal way that entities are created.
Puts can be used for update; the Rest standard does allow puts to be used for
updates or creates - but normally I see Puts for update only.
> Issue with uniqueAttribute while creation of entities
> -----------------------------------------------------
>
> Key: ATLAS-1743
> URL: https://issues.apache.org/jira/browse/ATLAS-1743
> Project: Atlas
> Issue Type: Bug
> Components: atlas-core
> Affects Versions: 0.8-incubating, 0.9-incubating
> Reporter: Sharmadha Sainath
>
> Atlas allows creation of entities with same value for unique attributes.
> For example ,
> 1. Created an hdfs_path entity with
> * name = dir1
> * qualifiedName = "userdir@cl1"
> * path = /user/user1/dir
> Entity is created successfully.
> 2. Created another hdfs_path entity with
> * name = dir2
> * qualifiedName = "userdir@cl1"
> * path = /user/user2/dir
> Qualified Name is uniqueAttribute and entity creation with same Qualified
> Name is allowed.
> Problem is when the 2nd hdfs_path entity is created , 1st entity is updated
> with 2nd entity's values , hence 2nd entity creation is merely an update call
> here instead of a create call because of same unique attribute.
> There is no condition to check uniqueness of attributes while creation of
> entities which is causing the problem.
> If 1st hdfs_path entity is DELETED , then 2nd hdfs_path entity POST call
> creates new entity.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)