You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/04/05 23:00:06 UTC

[GitHub] [pulsar] rdhabalia commented on a change in pull request #3991: [pulsar-storm] Fix NPE while emitting next tuple

rdhabalia commented on a change in pull request #3991: [pulsar-storm] Fix NPE while emitting next tuple
URL: https://github.com/apache/pulsar/pull/3991#discussion_r272766172
 
 

 ##########
 File path: pulsar-storm/src/main/java/org/apache/pulsar/storm/PulsarSpout.java
 ##########
 @@ -215,6 +204,36 @@ public void emitNextAvailableTuple() {
         }
     }
 
+    private boolean emitFailedMessage() {
+        Message<byte[]> msg;
+
+        while ((msg = failedMessages.peek()) != null) {
+            MessageRetries messageRetries = pendingMessageRetries.get(msg.getMessageId());
+            if (messageRetries != null) {
 
 Review comment:
   I wouldn't much worry about it because this piece of code is not being reused and `nextTuple` anyway is calling `emitNextAvailableTuple` and I don't think we want to do another method call for this small logic.

----------------------------------------------------------------
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