ATLAS-3948: Entity Creation: Index Consistency: Java Patch Handler: Provide Option to Disable
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 @@
@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 {