-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Print position info when can't find next valid position. #11969
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zymap
approved these changes
Sep 8, 2021
codelipenghui
approved these changes
Sep 8, 2021
codelipenghui
added
release/2.8.2
release/2.7.4
type/enhancement
The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
labels
Sep 8, 2021
@Technoboy- Thanks for your contribution. For this PR, do we need to update docs? (The PR template contains info about doc, which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks) |
codelipenghui
pushed a commit
that referenced
this pull request
Sep 9, 2021
## Motivation When the user reset the cursor and does not find the next valid one, the original log does'nt print position info. ``` 12:13:36.676 [pulsar-web-67-14] INFO org.apache.pulsar.broker.service.persistent.PersistentSubscription - [persistent://public/default/test][sub] Successfully disconnected consumers from subscription, proceeding with cursor reset 12:13:36.676 [bookkeeper-ml-workers-OrderedExecutor-2-0] ERROR org.apache.bookkeeper.mledger.impl.ManagedLedgerImpl - [public/default/persistent/test] Can't find next valid position, fail back to the next position of the last position. java.lang.NullPointerException: null at org.apache.bookkeeper.mledger.impl.ManagedLedgerImpl.getNextValidPositionInternal(ManagedLedgerImpl.java:3031) ~[io.streamnative-managed-ledger-2.7.2.10.jar:2.7.2.10] at org.apache.bookkeeper.mledger.impl.ManagedLedgerImpl.getNextValidPosition(ManagedLedgerImpl.java:3018) ~[io.streamnative-managed-ledger-2.7.2.10.jar:2.7.2.10] at org.apache.bookkeeper.mledger.impl.ManagedCursorImpl.lambda$asyncResetCursor$6(ManagedCursorImpl.java:1086) ~[io.streamnative-managed-ledger-2.7.2.10.jar:2.7.2.10] at org.apache.bookkeeper.mledger.util.SafeRun$1.safeRun(SafeRun.java:32) [io.streamnative-managed-ledger-2.7.2.10.jar:2.7.2.10] at org.apache.bookkeeper.common.util.SafeRunnable.run(SafeRunnable.java:36) [org.apache.bookkeeper-bookkeeper-common-4.12.0.jar:4.12.0] at org.apache.bookkeeper.common.util.OrderedExecutor$TimedRunnable.run(OrderedExecutor.java:203) [org.apache.bookkeeper-bookkeeper-common-4.12.0.jar:4.12.0] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_281] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_281] at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [io.netty-netty-common-4.1.60.Final.jar:4.1.60.Final] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_281] ``` So it's better to add position info to the log. (cherry picked from commit 3cd5b9e)
codelipenghui
pushed a commit
that referenced
this pull request
Dec 11, 2021
When the user reset the cursor and does not find the next valid one, the original log does'nt print position info. ``` 12:13:36.676 [pulsar-web-67-14] INFO org.apache.pulsar.broker.service.persistent.PersistentSubscription - [persistent://public/default/test][sub] Successfully disconnected consumers from subscription, proceeding with cursor reset 12:13:36.676 [bookkeeper-ml-workers-OrderedExecutor-2-0] ERROR org.apache.bookkeeper.mledger.impl.ManagedLedgerImpl - [public/default/persistent/test] Can't find next valid position, fail back to the next position of the last position. java.lang.NullPointerException: null at org.apache.bookkeeper.mledger.impl.ManagedLedgerImpl.getNextValidPositionInternal(ManagedLedgerImpl.java:3031) ~[io.streamnative-managed-ledger-2.7.2.10.jar:2.7.2.10] at org.apache.bookkeeper.mledger.impl.ManagedLedgerImpl.getNextValidPosition(ManagedLedgerImpl.java:3018) ~[io.streamnative-managed-ledger-2.7.2.10.jar:2.7.2.10] at org.apache.bookkeeper.mledger.impl.ManagedCursorImpl.lambda$asyncResetCursor$6(ManagedCursorImpl.java:1086) ~[io.streamnative-managed-ledger-2.7.2.10.jar:2.7.2.10] at org.apache.bookkeeper.mledger.util.SafeRun$1.safeRun(SafeRun.java:32) [io.streamnative-managed-ledger-2.7.2.10.jar:2.7.2.10] at org.apache.bookkeeper.common.util.SafeRunnable.run(SafeRunnable.java:36) [org.apache.bookkeeper-bookkeeper-common-4.12.0.jar:4.12.0] at org.apache.bookkeeper.common.util.OrderedExecutor$TimedRunnable.run(OrderedExecutor.java:203) [org.apache.bookkeeper-bookkeeper-common-4.12.0.jar:4.12.0] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_281] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_281] at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [io.netty-netty-common-4.1.60.Final.jar:4.1.60.Final] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_281] ``` So it's better to add position info to the log. (cherry picked from commit 3cd5b9e)
bharanic-dev
pushed a commit
to bharanic-dev/pulsar
that referenced
this pull request
Mar 18, 2022
## Motivation When the user reset the cursor and does not find the next valid one, the original log does'nt print position info. ``` 12:13:36.676 [pulsar-web-67-14] INFO org.apache.pulsar.broker.service.persistent.PersistentSubscription - [persistent://public/default/test][sub] Successfully disconnected consumers from subscription, proceeding with cursor reset 12:13:36.676 [bookkeeper-ml-workers-OrderedExecutor-2-0] ERROR org.apache.bookkeeper.mledger.impl.ManagedLedgerImpl - [public/default/persistent/test] Can't find next valid position, fail back to the next position of the last position. java.lang.NullPointerException: null at org.apache.bookkeeper.mledger.impl.ManagedLedgerImpl.getNextValidPositionInternal(ManagedLedgerImpl.java:3031) ~[io.streamnative-managed-ledger-2.7.2.10.jar:2.7.2.10] at org.apache.bookkeeper.mledger.impl.ManagedLedgerImpl.getNextValidPosition(ManagedLedgerImpl.java:3018) ~[io.streamnative-managed-ledger-2.7.2.10.jar:2.7.2.10] at org.apache.bookkeeper.mledger.impl.ManagedCursorImpl.lambda$asyncResetCursor$6(ManagedCursorImpl.java:1086) ~[io.streamnative-managed-ledger-2.7.2.10.jar:2.7.2.10] at org.apache.bookkeeper.mledger.util.SafeRun$1.safeRun(SafeRun.java:32) [io.streamnative-managed-ledger-2.7.2.10.jar:2.7.2.10] at org.apache.bookkeeper.common.util.SafeRunnable.run(SafeRunnable.java:36) [org.apache.bookkeeper-bookkeeper-common-4.12.0.jar:4.12.0] at org.apache.bookkeeper.common.util.OrderedExecutor$TimedRunnable.run(OrderedExecutor.java:203) [org.apache.bookkeeper-bookkeeper-common-4.12.0.jar:4.12.0] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_281] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_281] at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [io.netty-netty-common-4.1.60.Final.jar:4.1.60.Final] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_281] ``` So it's better to add position info to the log.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
cherry-picked/branch-2.7
Archived: 2.7 is end of life
cherry-picked/branch-2.8
Archived: 2.8 is end of life
doc-not-needed
Your PR changes do not impact docs
release/2.7.4
release/2.8.2
release/2.9.0
type/enhancement
The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
When the user reset the cursor and does not find the next valid one, the original log does'nt print position info.
So it's better to add position info to the log.