This is an automated email from the ASF dual-hosted git repository.

amestry pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/atlas.git


The following commit(s) were added to refs/heads/branch-2.0 by this push:
     new a2ea7d3  ATLAS-3948: Entity Creation: Index Consistency: Java Patch 
Handler: Provide Option to Disable
a2ea7d3 is described below

commit a2ea7d302e1ef8d6e9dd6f88e25749233a40e0f6
Author: Ashutosh Mestry <[email protected]>
AuthorDate: Thu Sep 17 13:09:46 2020 -0700

    ATLAS-3948: Entity Creation: Index Consistency: Java Patch Handler: Provide 
Option to Disable
---
 .../org/apache/atlas/repository/patches/IndexConsistencyPatch.java  | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git 
a/repository/src/main/java/org/apache/atlas/repository/patches/IndexConsistencyPatch.java
 
b/repository/src/main/java/org/apache/atlas/repository/patches/IndexConsistencyPatch.java
index 2abe73c..9549e2d 100644
--- 
a/repository/src/main/java/org/apache/atlas/repository/patches/IndexConsistencyPatch.java
+++ 
b/repository/src/main/java/org/apache/atlas/repository/patches/IndexConsistencyPatch.java
@@ -17,6 +17,7 @@
  */
 package org.apache.atlas.repository.patches;
 
+import org.apache.atlas.AtlasConfiguration;
 import org.apache.atlas.exception.AtlasBaseException;
 import org.apache.atlas.repository.graphdb.AtlasGraph;
 import org.apache.atlas.type.AtlasTypeRegistry;
@@ -40,6 +41,11 @@ public class IndexConsistencyPatch extends AtlasPatchHandler 
{
 
     @Override
     public void apply() throws AtlasBaseException {
+        if (AtlasConfiguration.STORAGE_CONSISTENCY_LOCK_ENABLED.getBoolean() 
== false) {
+            LOG.info("IndexConsistencyPatch: Not enabled: Skipped!");
+            return;
+        }
+
         AtlasGraph graph = context.getGraph();
 
         try {

Reply via email to