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

[ECO-4813] fix: race condition in pending message processing #1010

Merged
merged 1 commit into from
Jun 3, 2024

Conversation

ttypic
Copy link
Contributor

@ttypic ttypic commented Jun 3, 2024

Resolves #1009

If an ACK/NACK message arrives during ConnectionManager#addPendingMessagesToQueuedMessages, it breaks the internal pending message's startSerial. To avoid the race condition, a new thread-safe method, PendingMessageQueue#popAll, has been introduced, and all direct invocations of the PendingMessageQueue#queue field have been removed.

@github-actions github-actions bot temporarily deployed to staging/pull/1010/features June 3, 2024 06:27 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1010/javadoc June 3, 2024 06:28 Inactive
@ttypic ttypic requested a review from AndyTWF June 3, 2024 06:39
If an ACK/NACK message arrives during `ConnectionManager#addPendingMessagesToQueuedMessages`, it breaks the internal pending message's `startSerial`. To avoid the race condition, a new thread-safe method, `PendingMessageQueue#popAll`, has been introduced, and all direct invocations of the `PendingMessageQueue#queue` field have been removed.
@ttypic ttypic merged commit fe5215b into main Jun 3, 2024
9 checks passed
@ttypic ttypic deleted the ECO-4813/race-condition-pending-messages branch June 3, 2024 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

onMessage Exception
2 participants