Feature Summary
PriorityGroup.peek() advances the shared round-robin cursor while skipping empty subqueues. A read-only peek can therefore change which message a later get() returns.
Before: peek skips an empty queue -> shared cursor advances -> later get returns a different queue
After: peek scans with a local cursor -> shared cursor stays unchanged -> later get preserves round-robin order
Expected behavior:
Peeking should report the next available message without changing queue selection state or the order of a later get.
Reproduction evidence:
Create two same-priority subqueues, enqueue only in the second, and call peek(). Then enqueue in the first and call get().
Observed on 70c21145887920528d7d5540e3fb790b43e8b759:
cursor_before_peek=0
peek=second
cursor_after_peek=1
next_after_peek=second
next_without_peek=first
Version and commit evidence:
1.3.0-incubating-SNAPSHOT (main)
Commit Hash (Optional)
70c21145887920528d7d5540e3fb790b43e8b759
Proposed Solution or Design
After: peek scans with a local cursor -> shared cursor stays unchanged -> later get preserves round-robin order
Expected behavior:
Affected Area
Workflow Engine (Amber)
Feature Summary
PriorityGroup.peek()advances the shared round-robin cursor while skipping empty subqueues. A read-only peek can therefore change which message a laterget()returns.Before: peek skips an empty queue -> shared cursor advances -> later get returns a different queue
After: peek scans with a local cursor -> shared cursor stays unchanged -> later get preserves round-robin order
Expected behavior:
Peeking should report the next available message without changing queue selection state or the order of a later get.
Reproduction evidence:
Create two same-priority subqueues, enqueue only in the second, and call
peek(). Then enqueue in the first and callget().Observed on
70c21145887920528d7d5540e3fb790b43e8b759:Version and commit evidence:
1.3.0-incubating-SNAPSHOT (main)
Commit Hash (Optional)
70c21145887920528d7d5540e3fb790b43e8b759Proposed Solution or Design
After: peek scans with a local cursor -> shared cursor stays unchanged -> later get preserves round-robin order
Expected behavior:
Affected Area
Workflow Engine (Amber)