This is an automated email from the ASF dual-hosted git repository.
sidmishra pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/atlas.git
The following commit(s) were added to refs/heads/master by this push:
new 7211f47 ATLAS-4481: Fixed NPE at Atlas API on update classifications
without propagate flag
7211f47 is described below
commit 7211f4724fe827ebec1a6c1891a9b46b72f3553f
Author: Sidharth Mishra <[email protected]>
AuthorDate: Tue Nov 16 13:26:06 2021 -0800
ATLAS-4481: Fixed NPE at Atlas API on update classifications without
propagate flag
Signed-off-by: Sidharth Mishra <[email protected]>
---
.../apache/atlas/repository/store/graph/v2/EntityGraphMapper.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
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 6d8305a..f6c50bc 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
@@ -1065,7 +1065,7 @@ public class EntityGraphMapper {
if (trimmedLength < value.length()) {
LOG.warn("Length of indexed attribute {} is {} characters,
longer than safe-limit {}; trimming to {} - attempt #{}",
attribute.getQualifiedName(), value.length(), INDEXED_STR_SAFE_LEN,
trimmedLength, requestContext.getAttemptCount());
- String checksumSuffix = ":" + DigestUtils.shaHex(value);
// Storing SHA checksum in case verification is needed after retrieval
+ String checksumSuffix = ":" +
DigestUtils.sha256Hex(value); // Storing SHA checksum in case verification is
needed after retrieval
ret = value.substring(0, trimmedLength -
checksumSuffix.length()) + checksumSuffix;
} else {
@@ -2407,7 +2407,7 @@ public class EntityGraphMapper {
| true | false | => Remove Tag Propagation (send
REMOVE classification notifications)
|-------------|-------------| */
- if (taskManagement != null && DEFERRED_ACTION_ENABLED) {
+ if (updatedTagPropagation != null && taskManagement != null &&
DEFERRED_ACTION_ENABLED) {
String propagationType = updatedTagPropagation ?
CLASSIFICATION_PROPAGATION_ADD : CLASSIFICATION_PROPAGATION_DELETE;
createAndQueueTask(propagationType, entityVertex,
classificationVertex.getIdForDisplay());
@@ -2840,4 +2840,4 @@ public class EntityGraphMapper {
AtlasGraphUtilsV2.removeItemFromListProperty(edge,
EDGE_PENDING_TASKS_PROPERTY_KEY, taskGuid);
}
-}
\ No newline at end of file
+}