Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[improve][broker] Add a message to a NullPointerException created in ManagedLedgerImpl #17293

Merged
merged 1 commit into from
Sep 28, 2022

Conversation

lhotari
Copy link
Member

@lhotari lhotari commented Aug 26, 2022

Motivation

  • a NPE with no description is confusing

Seeing this in logs of org.apache.pulsar.client.api.SubscriptionMessageDispatchThrottlingTest#testMultiLevelDispatch

2022-08-26T11:18:10,532 - ERROR - [broker-topic-workers-OrderedExecutor-3-0:SafeRunnable@38] - Unexpected throwable caught
java.lang.NullPointerException: null

Modifications

Add a description to the NPE.

  • doc-not-needed

@lhotari lhotari self-assigned this Aug 26, 2022
@lhotari lhotari added doc-not-needed Your PR changes do not impact docs type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages area/broker labels Aug 26, 2022
@merlimat
Copy link
Contributor

@lhotari While the throw new NullPointerException() is clearly not good, I think the logline is generated when the exception is repeated multiple times. The JVM will omit the stack traces and the message after a while.

@Technoboy- Technoboy- force-pushed the lh-add-message-to-npe branch from f841a38 to 3065181 Compare August 31, 2022 09:12
…ManagedLedgerImpl

- a NPE with no description is confusing

Seeing this in logs of org.apache.pulsar.client.api.SubscriptionMessageDispatchThrottlingTest#testMultiLevelDispatch

2022-08-26T11:18:10,532 - ERROR - [broker-topic-workers-OrderedExecutor-3-0:SafeRunnable@38] - Unexpected throwable caught
java.lang.NullPointerException: null
@lhotari lhotari force-pushed the lh-add-message-to-npe branch from 3065181 to d55762f Compare September 28, 2022 05:43
@lhotari lhotari merged commit dfd4882 into apache:master Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/broker doc-not-needed Your PR changes do not impact docs type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants