You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2019/12/04 22:21:22 UTC

[GitHub] [nifi] turcsanyip commented on a change in pull request #3915: NIFI-6926: Fixed memory leak in NiFiAtlasHook

turcsanyip commented on a change in pull request #3915: NIFI-6926: Fixed memory leak in NiFiAtlasHook
URL: https://github.com/apache/nifi/pull/3915#discussion_r354015235
 
 

 ##########
 File path: nifi-nar-bundles/nifi-atlas-bundle/nifi-atlas-reporting-task/src/main/java/org/apache/nifi/atlas/hook/NiFiAtlasHook.java
 ##########
 @@ -55,14 +55,23 @@ public void addMessage(HookNotificationMessage message) {
     }
 
     public void commitMessages() {
-        final NotificationSender notificationSender = new NotificationSender();
+        final NotificationSender notificationSender = createNotificationSender();
         notificationSender.setAtlasClient(atlasClient);
         notificationSender.send(messages, this::notifyEntities);
+        messages.clear();
 
 Review comment:
   Good point, I've checked it now: the items from list are streamed / collected into other data structures at the beginning of send(), so it shouldn't be a problem and the list itself never used later.
   Though, just to be on the safe side, I'll change it to create a new list after every commit.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services