You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by Madhan Neethiraj <ma...@apache.org> on 2016/11/03 01:22:47 UTC

Review Request 53417: ATLAS-1266: fixed typedef APIs to update type-registry only on successful graph commit

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

Review request for atlas, Apoorv Naik, Sarath Subramanian, Suma Shivaprasad, and Vimal Sharma.


Bugs: ATLAS-1266
    https://issues.apache.org/jira/browse/ATLAS-1266


Repository: atlas


Description
-------

Introduced PostTransactionHook in GraphTransactionInterceptor, which is used to ensure that type-registry is updated only after successful commit of changes in graph store


Diffs
-----

  intg/src/main/java/org/apache/atlas/type/AtlasTypeRegistry.java 95a5054 
  repository/src/main/java/org/apache/atlas/GraphTransactionInterceptor.java 1f8affe 
  repository/src/main/java/org/apache/atlas/RepositoryMetadataModule.java 0325c80 
  repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java 3c7f63b 
  repository/src/main/java/org/apache/atlas/repository/store/graph/AtlasTypeDefGraphStore.java 68d2781 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasTypeDefGraphStoreV1.java 878f355 

Diff: https://reviews.apache.org/r/53417/diff/


Testing
-------

Verified that PostTransactionHook works as expected by adding/udating/deleting types via REST APIs.


Thanks,

Madhan Neethiraj


Re: Review Request 53417: ATLAS-1266: fixed typedef APIs to update type-registry only on successful graph commit

Posted by Madhan Neethiraj <ma...@apache.org>.

> On Nov. 3, 2016, 5:18 p.m., Suma Shivaprasad wrote:
> > repository/src/main/java/org/apache/atlas/repository/store/graph/AtlasTypeDefGraphStore.java, line 1010
> > <https://reviews.apache.org/r/53417/diff/1/?file=1552756#file1552756line1010>
> >
> >     when indexing fails in GraphBackedSearchIndexer, shouldnt we bubble up the error? Else types can be created without indexes

at this time, type changes have already been committed. Bubbling exception wouldn't undo this.

Do you think index failure should result in rollback of type changes?


- Madhan


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


On Nov. 3, 2016, 1:22 a.m., Madhan Neethiraj wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53417/
> -----------------------------------------------------------
> 
> (Updated Nov. 3, 2016, 1:22 a.m.)
> 
> 
> Review request for atlas, Apoorv Naik, Sarath Subramanian, Suma Shivaprasad, and Vimal Sharma.
> 
> 
> Bugs: ATLAS-1266
>     https://issues.apache.org/jira/browse/ATLAS-1266
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Introduced PostTransactionHook in GraphTransactionInterceptor, which is used to ensure that type-registry is updated only after successful commit of changes in graph store
> 
> 
> Diffs
> -----
> 
>   intg/src/main/java/org/apache/atlas/type/AtlasTypeRegistry.java 95a5054 
>   repository/src/main/java/org/apache/atlas/GraphTransactionInterceptor.java 1f8affe 
>   repository/src/main/java/org/apache/atlas/RepositoryMetadataModule.java 0325c80 
>   repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java 3c7f63b 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/AtlasTypeDefGraphStore.java 68d2781 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasTypeDefGraphStoreV1.java 878f355 
> 
> Diff: https://reviews.apache.org/r/53417/diff/
> 
> 
> Testing
> -------
> 
> Verified that PostTransactionHook works as expected by adding/udating/deleting types via REST APIs.
> 
> 
> Thanks,
> 
> Madhan Neethiraj
> 
>


Re: Review Request 53417: ATLAS-1266: fixed typedef APIs to update type-registry only on successful graph commit

Posted by Suma Shivaprasad <su...@gmail.com>.

> On Nov. 3, 2016, 5:18 p.m., Suma Shivaprasad wrote:
> > repository/src/main/java/org/apache/atlas/repository/store/graph/AtlasTypeDefGraphStore.java, line 1010
> > <https://reviews.apache.org/r/53417/diff/1/?file=1552756#file1552756line1010>
> >
> >     when indexing fails in GraphBackedSearchIndexer, shouldnt we bubble up the error? Else types can be created without indexes
> 
> Madhan Neethiraj wrote:
>     at this time, type changes have already been committed. Bubbling exception wouldn't undo this.
>     
>     Do you think index failure should result in rollback of type changes?
> 
> Madhan Neethiraj wrote:
>     Suma - I suggest we discuss this further and take this in a separate patch/HIRA. Is that alright?

Thats fine. We can take this up in another jira


- Suma


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


On Nov. 3, 2016, 1:22 a.m., Madhan Neethiraj wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53417/
> -----------------------------------------------------------
> 
> (Updated Nov. 3, 2016, 1:22 a.m.)
> 
> 
> Review request for atlas, Apoorv Naik, Sarath Subramanian, Suma Shivaprasad, and Vimal Sharma.
> 
> 
> Bugs: ATLAS-1266
>     https://issues.apache.org/jira/browse/ATLAS-1266
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Introduced PostTransactionHook in GraphTransactionInterceptor, which is used to ensure that type-registry is updated only after successful commit of changes in graph store
> 
> 
> Diffs
> -----
> 
>   intg/src/main/java/org/apache/atlas/type/AtlasTypeRegistry.java 95a5054 
>   repository/src/main/java/org/apache/atlas/GraphTransactionInterceptor.java 1f8affe 
>   repository/src/main/java/org/apache/atlas/RepositoryMetadataModule.java 0325c80 
>   repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java 3c7f63b 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/AtlasTypeDefGraphStore.java 68d2781 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasTypeDefGraphStoreV1.java 878f355 
> 
> Diff: https://reviews.apache.org/r/53417/diff/
> 
> 
> Testing
> -------
> 
> Verified that PostTransactionHook works as expected by adding/udating/deleting types via REST APIs.
> 
> 
> Thanks,
> 
> Madhan Neethiraj
> 
>


Re: Review Request 53417: ATLAS-1266: fixed typedef APIs to update type-registry only on successful graph commit

Posted by Madhan Neethiraj <ma...@apache.org>.

> On Nov. 3, 2016, 5:18 p.m., Suma Shivaprasad wrote:
> > repository/src/main/java/org/apache/atlas/repository/store/graph/AtlasTypeDefGraphStore.java, line 1010
> > <https://reviews.apache.org/r/53417/diff/1/?file=1552756#file1552756line1010>
> >
> >     when indexing fails in GraphBackedSearchIndexer, shouldnt we bubble up the error? Else types can be created without indexes
> 
> Madhan Neethiraj wrote:
>     at this time, type changes have already been committed. Bubbling exception wouldn't undo this.
>     
>     Do you think index failure should result in rollback of type changes?

Suma - I suggest we discuss this further and take this in a separate patch/HIRA. Is that alright?


- Madhan


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


On Nov. 3, 2016, 1:22 a.m., Madhan Neethiraj wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53417/
> -----------------------------------------------------------
> 
> (Updated Nov. 3, 2016, 1:22 a.m.)
> 
> 
> Review request for atlas, Apoorv Naik, Sarath Subramanian, Suma Shivaprasad, and Vimal Sharma.
> 
> 
> Bugs: ATLAS-1266
>     https://issues.apache.org/jira/browse/ATLAS-1266
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Introduced PostTransactionHook in GraphTransactionInterceptor, which is used to ensure that type-registry is updated only after successful commit of changes in graph store
> 
> 
> Diffs
> -----
> 
>   intg/src/main/java/org/apache/atlas/type/AtlasTypeRegistry.java 95a5054 
>   repository/src/main/java/org/apache/atlas/GraphTransactionInterceptor.java 1f8affe 
>   repository/src/main/java/org/apache/atlas/RepositoryMetadataModule.java 0325c80 
>   repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java 3c7f63b 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/AtlasTypeDefGraphStore.java 68d2781 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasTypeDefGraphStoreV1.java 878f355 
> 
> Diff: https://reviews.apache.org/r/53417/diff/
> 
> 
> Testing
> -------
> 
> Verified that PostTransactionHook works as expected by adding/udating/deleting types via REST APIs.
> 
> 
> Thanks,
> 
> Madhan Neethiraj
> 
>


Re: Review Request 53417: ATLAS-1266: fixed typedef APIs to update type-registry only on successful graph commit

Posted by Suma Shivaprasad <su...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/53417/#review154771
-----------------------------------------------------------




repository/src/main/java/org/apache/atlas/repository/store/graph/AtlasTypeDefGraphStore.java (line 927)
<https://reviews.apache.org/r/53417/#comment224452>

    when indexing fails in GraphBackedSearchIndexer, shouldnt we bubble up the error? Else types can be created without indexes


- Suma Shivaprasad


On Nov. 3, 2016, 1:22 a.m., Madhan Neethiraj wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53417/
> -----------------------------------------------------------
> 
> (Updated Nov. 3, 2016, 1:22 a.m.)
> 
> 
> Review request for atlas, Apoorv Naik, Sarath Subramanian, Suma Shivaprasad, and Vimal Sharma.
> 
> 
> Bugs: ATLAS-1266
>     https://issues.apache.org/jira/browse/ATLAS-1266
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Introduced PostTransactionHook in GraphTransactionInterceptor, which is used to ensure that type-registry is updated only after successful commit of changes in graph store
> 
> 
> Diffs
> -----
> 
>   intg/src/main/java/org/apache/atlas/type/AtlasTypeRegistry.java 95a5054 
>   repository/src/main/java/org/apache/atlas/GraphTransactionInterceptor.java 1f8affe 
>   repository/src/main/java/org/apache/atlas/RepositoryMetadataModule.java 0325c80 
>   repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java 3c7f63b 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/AtlasTypeDefGraphStore.java 68d2781 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasTypeDefGraphStoreV1.java 878f355 
> 
> Diff: https://reviews.apache.org/r/53417/diff/
> 
> 
> Testing
> -------
> 
> Verified that PostTransactionHook works as expected by adding/udating/deleting types via REST APIs.
> 
> 
> Thanks,
> 
> Madhan Neethiraj
> 
>