You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by "Apoorv Naik (JIRA)" <ji...@apache.org> on 2017/05/12 02:39:04 UTC
[jira] [Updated] (ATLAS-1780) Type deletion blocks ability to
redefine same type with different attribute
[ https://issues.apache.org/jira/browse/ATLAS-1780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Apoorv Naik updated ATLAS-1780:
-------------------------------
Description:
This change supports the use-case where the user creates a type and deletes it sometime later, now the redefinition of the type is restricted to use the same data type for the attributes used during the initial creation.
Solution: Rename the propertyKey corresponding to that attribute using the titan management API by suffing _deleted_xxx where xxx is an increasing integer sequence starting from 0. The reason for increment of xxx is that the type create, delete and re-create can be done multiple times without any conflicting key in Titan.
Use case: Create a Tag/Trait with atleast one attribute, delete the tag, recreate the exact same tag with a different data type for the attribute. Creation will be a success, try associating the Tag/trait with any entity with the attribute value (new data type) this should fail with a ClassCastException
was:
This change supports the use-case where the user creates a type and deletes it sometime later, now the redefinition of the type is restricted to use the same data type for the attributes used during the initial creation.
Solution: Rename the propertyKey corresponding to that attribute using the titan management API by suffing _deleted_xxx where xxx is an increasing integer sequence starting from 0. The reason for increment of xxx is that the type create, delete and re-create can be done multiple times without any conflicting key in Titan.
> Type deletion blocks ability to redefine same type with different attribute
> ---------------------------------------------------------------------------
>
> Key: ATLAS-1780
> URL: https://issues.apache.org/jira/browse/ATLAS-1780
> Project: Atlas
> Issue Type: Bug
> Reporter: Apoorv Naik
> Assignee: Apoorv Naik
>
> This change supports the use-case where the user creates a type and deletes it sometime later, now the redefinition of the type is restricted to use the same data type for the attributes used during the initial creation.
> Solution: Rename the propertyKey corresponding to that attribute using the titan management API by suffing _deleted_xxx where xxx is an increasing integer sequence starting from 0. The reason for increment of xxx is that the type create, delete and re-create can be done multiple times without any conflicting key in Titan.
> Use case: Create a Tag/Trait with atleast one attribute, delete the tag, recreate the exact same tag with a different data type for the attribute. Creation will be a success, try associating the Tag/trait with any entity with the attribute value (new data type) this should fail with a ClassCastException
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)