atlas-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Madhan Neethiraj <mad...@apache.org>
Subject Re: Review Request 62957: ATLAS-2195: Addressing Txn Leak During Startup
Date Sat, 14 Oct 2017 02:59:50 GMT

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


Ship it!




Ship It!

- Madhan Neethiraj


On Oct. 14, 2017, 1:34 a.m., Ashutosh Mestry wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62957/
> -----------------------------------------------------------
> 
> (Updated Oct. 14, 2017, 1:34 a.m.)
> 
> 
> Review request for atlas, Madhan Neethiraj and Sarath Subramanian.
> 
> 
> Bugs: ATLAS-2195
>     https://issues.apache.org/jira/browse/ATLAS-2195
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> **Background**
> If entities and types are created simultaneously it was observed that some stale transactions
are created. Titan runs an eviction thread every minute to evict these out of transaction
cache. That is when the message mentioned in the bug appears.
> 
> **Analysis**
> During startup when built-in types are added to the database, the process did not use
_GraphTransactionInterceptor_ approach. This caused stale transactions to appear, which grew
over time.
> 
> ManagementSystem class in Titan creates a transaction object in its ctor. The user is
expected to close this when done with using it.
> 
> **Analysis for Part 2**
> 
> In our _GraphBackedSearchIndexer.getVertexIndexKeys_ we use this to get index keys. This
is invoked for every basic search.
>  
> Interestingly, new object is not created for each basic search. Only 1 transaction stays
open if user just keeps searching.
>  
> Behavior changes when new tag is created. The count of open transactions keeps incrementing.
> 
> **Instrumentation**
> Used _Titan's_ _StandardTitanGraph_ for adding instrumentation code. This is central
point for transaction operations.
> 
> Tracing the creation and co-relating them with destruction helped in narrowing down the
area of focus.
> 
> 
> Diffs
> -----
> 
>   repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java
8aa22377 
> 
> 
> Diff: https://reviews.apache.org/r/62957/diff/2/
> 
> 
> Testing
> -------
> 
> **Unit tests**
> Existing.
> 
> **Other**
> Executed the attached bash scripts to create numerous types and entities simultaneously.
> 
> Use this command:
> ```
> bash create-type.sh & bash create-entity.sh &
> ```
> 
> 
> File Attachments
> ----------------
> 
> create type
>   https://reviews.apache.org/media/uploaded/files/2017/10/12/755455cc-c08c-4885-9d07-5b5d9e3867e2__create-type.sh
> create entity
>   https://reviews.apache.org/media/uploaded/files/2017/10/12/b20ddb13-7300-493d-8f43-5fcaf884c055__create-entity.sh
> 
> 
> Thanks,
> 
> Ashutosh Mestry
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message