kalayciburak commented on code in PR #768:
URL: https://github.com/apache/atlas/pull/768#discussion_r4183750429
##########
webapp/src/main/java/org/apache/atlas/notification/SerialEntityProcessor.java:
##########
@@ -506,6 +506,11 @@ public TopicPartitionOffsetResult handleMessage(Ticket
ticket) {
String.format(AtlasClientV2.API_V2.UPDATE_ENTITY_BY_ATTRIBUTE.getNormalizedPath(),
partialUpdateRequest.getTypeName()));
}
+ if
(isIgnoredByConfiguredPattern(partialUpdateShell(partialUpdateRequest.getTypeName(),
partialUpdateRequest.getAttribute(),
partialUpdateRequest.getAttributeValue()), kafkaMsg)
+ || (entities != null &&
CollectionUtils.isNotEmpty(entities.getEntities()) &&
isIgnoredByConfiguredPattern(entities.getEntities().get(0), kafkaMsg))) {
Review Comment:
that second check is the case where the lookup attribute is not
qualifiedName.
partialUpdateShell only has typeName plus that attribute. shouldIgnore needs
both typeName and qualifiedName, so the shell never matches if the unique attr
is something else, even when the type is in the ignore pattern. the v1 body can
still have qualifiedName, so I check that before createOrUpdate. otherwise the
same type that was dropped on create still hits the store and fails as an
unknown typename.
if your hooks always key partial updates by qualifiedName, the first check
is enough and I can drop the second.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]