Repository navigation
Conversation
LinkedBlockingMultiQueue.add_sub_queue walked priority_groups to find the slot i where a new group belongs, then appended the group to the end instead of inserting it at i, so the list stayed sorted only when sub-queues were registered in increasing-priority order. get_next and peek iterate priority_groups in list order, so a data channel (priority 1) registered before a control channel (priority 0) was served before control. The new group is now inserted at i, keeping the list sorted regardless of registration order. test_linked_blocking_multi_queue adds a case that registers the lower-priority queue first and asserts the groups are ordered by priority and that the higher-priority item is served first.
Contributor
Backport auto-label reportThis
|
Contributor
Automated Reviewer SuggestionsBased on the
|
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changes were proposed in this PR?
Any related issues, documentation, discussions?
Closes: #9583
How was this PR tested?
cd amber && PYTHONPATH=src/main/python python -m pytest src/test/python/core/util/customized_queue/test_linked_blocking_multi_queue.py; expect all passing, including a new case that registers the lower-priority queue first and asserts the groups are ordered by priority and the higher-priority item is served first.Was this PR authored or co-authored using generative AI tooling?
Co-authored with Claude Opus 4.8 in compliance with ASF