mneethiraj commented on code in PR #339:
URL: https://github.com/apache/atlas/pull/339#discussion_r2067898272


##########
repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java:
##########
@@ -336,7 +336,7 @@ public AtlasVertex createVertexWithGuid(AtlasEntity entity, 
String guid) throws
 
         setCustomAttributes(ret, entity);
 
-        if (RequestContext.getIsUpdateNotification() || 
CollectionUtils.isNotEmpty(entity.getLabels())) {
+        if (RequestContext.get().getIsUpdateNotification() || 
CollectionUtils.isNotEmpty(entity.getLabels())) {

Review Comment:
   Since the vertext is being created in this method 
(`createVertexWithGuid()`), is it necessary to check whether the notification 
is of type update? Also, note that it is possible for an entity to be created 
even while processing notifications of type `ENTITY_FULL_UPDATE_V2` or 
`ENTITY_PARTIAL_UPDATE_V2 `.
   
   Only checking if `entity.getLabels()` is not empty before calling 
`setLabels()` should be enough. Please review and update.



-- 
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: dev-unsubscr...@atlas.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to