[
https://issues.apache.org/jira/browse/ARTEMIS-4319?focusedWorklogId=866760&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-866760
]
ASF GitHub Bot logged work on ARTEMIS-4319:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 21/Jun/23 13:41
Start Date: 21/Jun/23 13:41
Worklog Time Spent: 10m
Work Description: gemmellr commented on code in PR #4512:
URL: https://github.com/apache/activemq-artemis/pull/4512#discussion_r1237023946
##########
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:
If the value can be null then having the logger method allow for that seems
reasonable...however...
If the limit value was null, why was it even logging that a non-existent
limit was exceeded? Does this only happen when the value is removed/changed
while already running, or something? Or is this pointing to an actual
behavioural problem somewhere leading to a mis-logging?
Issue Time Tracking
-------------------
Worklog Id: (was: 866760)
Time Spent: 20m (was: 10m)
> Mitigate NPE in paging log statement
> ------------------------------------
>
> Key: ARTEMIS-4319
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4319
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Reporter: Justin Bertram
> Assignee: Justin Bertram
> Priority: Major
> Time Spent: 20m
> Remaining Estimate: 0h
>
> From the user's mailing list:
> {quote}
> ...when we remove the limit, as it was too less for our case, we got null
> pointer exception in logs so we are currently forced to use less page limit.
> Since the error here tries to convert to longValue...
> {noformat}
> [org.apache.activemq.artemis.core.server] AMQ222225: Sending unexpected
> exception to the client java.lang.NullPointerException: Cannot invoke
> "java.lang.Long.longValue()" because "this.pageLimitBytes" is null
> at
> org.apache.activemq.artemis.core.paging.impl.PagingStoreImpl.checkNumberOfPages(PagingStoreImpl.java:324)
> ~[artemis-server-2.28.0.jar:2.28.0]{noformat}{quote}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)