----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/72722/ -----------------------------------------------------------
(Updated July 30, 2020, 10:49 p.m.) Review request for atlas, Damian Warszawski, Madhan Neethiraj, Nikhil Bonte, Nixon Rodrigues, and Sarath Subramanian. Changes ------- Updates include: Addressed review comments. Bugs: ATLAS-3907 https://issues.apache.org/jira/browse/ATLAS-3907 Repository: atlas Description ------- **Approach** Please see JIRA for details. Changes: - New: *IndexConsistencyPatch*: New java patch handler. - Modified: Added method: *AtlasJanusGraphManagement.setConsistencyForAllIndexes* that enumerates all the existing indexes and calls the *setConsistency* method. Diffs (updated) ----- graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphManagement.java fca789027 graphdb/janus/src/main/java/org/apache/atlas/repository/graphdb/janus/AtlasJanusGraphManagement.java 6ef9cb76c repository/src/main/java/org/apache/atlas/repository/patches/AtlasPatchManager.java 093edf978 repository/src/main/java/org/apache/atlas/repository/patches/IndexConsistencyPatch.java PRE-CREATION Diff: https://reviews.apache.org/r/72722/diff/3/ Changes: https://reviews.apache.org/r/72722/diff/2-3/ Testing ------- **Unit tests** None. **Functional tests** Used the script below to concurrently create same entity. See attached (t.json) that contains entity payload. Steps to test: 1. Deploy Atlas without this patch (or any other patch) with *setConsistency*. 2. Execute the script below with the payload *t1.json*. 3. Notice that multiple entities of *hdfs_path* type get created. Few of the REST calls may fail with *AtlasSchemaViolation* exception. 4. Deploy this change and restart Atlas. Notice that the new patch gets applied. 5. Modify *t1.json* by replacing e1 with e2. 6. Execute the script below. 7. Notice that only 1 entity *hdfs_path* with name e2 gets created. *multiple-curl.sh* ```bash #!/bin/bash URL=<server> echo ${URL} for i in `seq 10`; do curl -u admin:admin123 -X POST http://${URL}:31000/api/atlas/v2/entity/bulk --header 'Content-Type: application/json' -d @./t.json & done ``` **Pre-commit** https://builds.apache.org/view/A/view/Atlas/job/PreCommit-ATLAS-Build-Test/2074/: Succeeded. File Attachments ---------------- entity payload https://reviews.apache.org/media/uploaded/files/2020/07/30/62c25f8c-87cb-458d-a49e-ce41a96855de__t.json Thanks, Ashutosh Mestry