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

[FIXED] Avoid ack id collision in PublishAsync #1812

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

piotrpio
Copy link
Collaborator

@piotrpio piotrpio commented Mar 3, 2025

Fixes #1801

Signed-off-by: Piotr Piotrowski [email protected]

@piotrpio piotrpio force-pushed the publish-async-deadlock branch from a9252ba to 19aa068 Compare March 3, 2025 18:26
@piotrpio piotrpio requested a review from Jarema March 3, 2025 18:26
@coveralls
Copy link

coveralls commented Mar 3, 2025

Coverage Status

coverage: 84.837% (-0.02%) from 84.861%
when pulling ac4b278 on publish-async-deadlock
into da7160e on main.

@piotrpio piotrpio requested a review from wallyqs March 3, 2025 18:34
js.go Outdated
l /= base
}
replyID := string(b[:])
if _, ok := js.pafs[replyID]; ok {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better to avoid keeping the string and let do Write use the bytes as it was before

Suggested change
if _, ok := js.pafs[replyID]; ok {
if _, ok := js.pafs[string(b[:])]; ok {

@piotrpio piotrpio force-pushed the publish-async-deadlock branch from 19aa068 to ac4b278 Compare March 5, 2025 13:52
Copy link
Member

@wallyqs wallyqs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deadlock on PublishMsgAsync
3 participants