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

Fix: make sure FIFO order between write and notify channel active #2597

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

Conversation

okg-cxf
Copy link

@okg-cxf okg-cxf commented Jan 17, 2024

Fix #2598

If write() comes in between the line this.channel = channel and sharedLock.doExclusive(() -> {} in notifyChannelActive(), the FIFO order is violated since the previous entered commands have not been flushed yet.
See the test case writeShouldGuaranteeFIFOOrder()
Make sure that:

  • [Y] You have read the contribution guidelines.
  • [N] You have created a feature request first to discuss your contribution intent. Please reference the feature request ticket number in the pull request. (No since it is a bug fix instead of a feature).
  • [Y] You use the code formatters provided here and have them applied to your changes. Don’t submit any formatting related changes.
  • [Y] You submit test cases (unit or integration tests) that back your changes.

@okg-cxf okg-cxf changed the title Fix/make sure fifo order between write and notify channel active Fix/make sure FIFO order between write and notify channel active Jan 17, 2024
@okg-cxf okg-cxf force-pushed the fix/make-sure-fifo-order-between-write-and-notifyChannelActive branch from ea9770e to cf44e24 Compare January 17, 2024 12:15
…o make sure channel access thread-safe and avoid potential NPE
@okg-cxf okg-cxf force-pushed the fix/make-sure-fifo-order-between-write-and-notifyChannelActive branch from cf44e24 to d23c68f Compare January 18, 2024 06:18
@okg-cxf okg-cxf changed the title Fix/make sure FIFO order between write and notify channel active Fix: make sure FIFO order between write and notify channel active Jan 18, 2024
@okg-cxf okg-cxf changed the title Fix: make sure FIFO order between write and notify channel active Fix: make sure FIFO order between write and notify channel active Jan 18, 2024
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.

FIFO order is not respected in DefaultEndpoint#notifyChannelActive()
1 participant