This is an automated email from the ASF dual-hosted git repository.
nixon 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 f000237 ATLAS-3381: Addressed ConcurrentPatchProcessor not calling
commit.
f000237 is described below
commit f000237a3caad91a77bacdba5e6dbd5fd1ce41f3
Author: Ashutosh Mestry <[email protected]>
AuthorDate: Tue Aug 20 09:04:54 2019 -0700
ATLAS-3381: Addressed ConcurrentPatchProcessor not calling commit.
Signed-off-by: nixonrodrigues <[email protected]>
(cherry picked from commit 6fbda5bcee4d9a06fc83cd80533a9971b88bb417)
---
.../atlas/repository/patches/ConcurrentPatchProcessor.java | 1 +
.../atlas/repository/store/graph/v2/EntityGraphMapper.java | 11 ++++++-----
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git
a/repository/src/main/java/org/apache/atlas/repository/patches/ConcurrentPatchProcessor.java
b/repository/src/main/java/org/apache/atlas/repository/patches/ConcurrentPatchProcessor.java
index 813a9c1..3eedb98 100644
---
a/repository/src/main/java/org/apache/atlas/repository/patches/ConcurrentPatchProcessor.java
+++
b/repository/src/main/java/org/apache/atlas/repository/patches/ConcurrentPatchProcessor.java
@@ -222,6 +222,7 @@ public abstract class ConcurrentPatchProcessor {
try {
individualItemProcessor.processVertexItem(vertexId, vertex,
typeName, entityType);
+ doCommit();
} catch (AtlasBaseException e) {
LOG.error("Error processing: {}", vertexId, e);
}
diff --git
a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java
b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java
index f9010fe..145e700 100644
---
a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java
+++
b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java
@@ -1697,12 +1697,13 @@ public class EntityGraphMapper {
}
public void updateClassificationTextAndNames(AtlasVertex vertex) throws
AtlasBaseException {
- String guid = GraphHelper.getGuid(vertex);
- AtlasEntity entity = instanceConverter.getAndCacheEntity(guid);
-
- if (CollectionUtils.isEmpty(entity.getClassifications())) return;
+ if (StringUtils.isEmpty(vertex.getProperty(CLASSIFICATION_NAMES_KEY,
String.class))) {
+ return;
+ }
- List<String> classificationNames = new ArrayList<>();
+ String guid = GraphHelper.getGuid(vertex);
+ AtlasEntity entity = instanceConverter.getAndCacheEntity(guid);
+ List<String> classificationNames = new ArrayList<>();
List<String> propagatedClassificationNames = new ArrayList<>();
for (AtlasClassification classification : entity.getClassifications())
{