-
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
Fixed accessing MessageImpl after it was enqueued on user queue #11824
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great Job!
@MMirelli this may be a problem that should make some Fallout tests against current master to fail. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm
It would be good to have a test case that covers this problem
(cherry picked from commit 666ad3b)
Motivation
There is an exception that is thrown (and not shown, but that's a different issue) when using a consumer with message pooling enabled and consuming from a partitioned topic.
After a short amount of time the consumption silently stops.
The exception is:
The issue is easily reproducible by using
pulsar-perf consume
over a partitioned topic, sincepulsar-perf
is using message pooling by default.The root cause is that we are accessing the message object instance after it was enqueued on the queue where the user will pick it up.
The user is doing something like:
When
msg.release()
gets called, the object fields are nulled and then the object goes back to the pool. For that, from inside the client lib, we cannot touch that object from the moment it gets put on the queue.