> On May 5, 2017, 8:14 a.m., David Radley wrote:
> > graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphManagement.java
> > Lines 69 (patched)
> > <https://reviews.apache.org/r/58985/diff/2/?file=1708921#file1708921line69>
> >
> >     It does not seem right to rename property keys in old types. This seems 
> > to me to be changing history - which is not great for audit. 
> >     
> >     I do not understand why the name type is restricted to the old name - 
> > can we not change this logic? 
> >     I would suggest we tolerate more than one type of the same name - only 
> > one of which can be active at any one time - each type chould have their 
> > own shape and guid. All references to a type should be by guid - so we 
> > should not get confused by reusing a name.

The reason we're renaming the property key name is that once the type is 
deleted, the data type information (schema) still persists in Titan. Now when 
we try to recreate that type with same attribute but different data type, the 
schema is violated and it fails. Titan docs recommend changing the name (as it 
can't be deleted by titan) in order to redefine the key. The test will make it 
more clear, without this change the new test would fail.


- Apoorv


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58985/#review174009
-----------------------------------------------------------


On May 4, 2017, 10:07 p.m., Apoorv Naik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58985/
> -----------------------------------------------------------
> 
> (Updated May 4, 2017, 10:07 p.m.)
> 
> 
> Review request for atlas.
> 
> 
> Repository: atlas
> 
> 
> 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.
> 
> 
> Diffs
> -----
> 
>   
> graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphManagement.java
>  5efd7c0f 
>   
> graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/Titan0GraphManagement.java
>  9a17d9ee 
>   
> graphdb/titan1/src/main/java/org/apache/atlas/repository/graphdb/titan1/Titan1GraphManagement.java
>  12faeda5 
>   intg/src/main/java/org/apache/atlas/listener/TypeDefChangeListener.java 
> 124f106f 
>   intg/src/main/java/org/apache/atlas/type/AtlasTypeRegistry.java ea2a7038 
>   
> repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java
>  47dccf19 
>   
> repository/src/test/java/org/apache/atlas/repository/impexp/ExportServiceTest.java
>  a7fc24cf 
>   
> repository/src/test/java/org/apache/atlas/repository/store/graph/AtlasTypeDefGraphStoreTest.java
>  84ad72c8 
> 
> 
> Diff: https://reviews.apache.org/r/58985/diff/2/
> 
> 
> Testing
> -------
> 
> mvn clean package and mvn clean install run successfully.
> 
> 
> Thanks,
> 
> Apoorv Naik
> 
>

Reply via email to