You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by "jbertram (via GitHub)" <gi...@apache.org> on 2023/06/21 16:13:49 UTC

[GitHub] [activemq-artemis] jbertram commented on a diff in pull request #4512: ARTEMIS-4319 mitigate NPE in paging log statement

jbertram commented on code in PR #4512:
URL: https://github.com/apache/activemq-artemis/pull/4512#discussion_r1237260437


##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java:
##########
@@ -1573,13 +1573,13 @@ void slowConsumerDetected(String sessionID,
    @LogMessage(id = 224122, value = "Address {} number of messages is under page limit again, and it should be allowed to page again.", level = LogMessage.Level.INFO)
    void pageFree(SimpleString address);
 
-   @LogMessage(id = 224123, value = "Address {} has more pages than allowed. System currently has {} pages, while the estimated max number of pages is {}, based on the limitPageBytes ({}) / page-size ({})", level = LogMessage.Level.WARN)
-   void pageFullMaxBytes(SimpleString address, long pages, long maxPages, long limitBytes, long bytes);
+   @LogMessage(id = 224123, value = "Address {} has more pages than allowed. System currently has {} pages, while the estimated max number of pages is {} based on the page-limit-bytes ({}) / page-size ({})", level = LogMessage.Level.WARN)
+   void pageFullMaxBytes(SimpleString address, long pages, Long maxPages, Long limitBytes, int bytes);

Review Comment:
   I'm not entirely sure how this gets logged when the limit is `null`. This is what was reported by a user on the [mailing list](https://lists.apache.org/thread/j9v7j6w0hff0sbmhn7qyzy79cj54ohhv):
   
   > My hunch is that once we set a limit, we cannot remove the section completely, so set a very low `<page-limit-bytes>` and start the broker, let the address start paging and then remove the `<page-limit-bytes>` completely from address setting.
   
   It looks like there may be other, larger issues present, but I wanted to mitigate the NPE before going deeper.



-- 
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: gitbox-unsubscribe@activemq.apache.org

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