You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "thetumbled (via GitHub)" <gi...@apache.org> on 2025/03/03 02:27:12 UTC
Re: [PR] [fix][broker] fix delay queue sequence issue. [pulsar]
thetumbled commented on PR #24035:
URL: https://github.com/apache/pulsar/pull/24035#issuecomment-2693129291
> @thetumbled Is it #23611 where the regression was introduced? Does the previous implementation have a similar issue?
The previous implementation has sequence issue too, but triggered by other way. Previouse implementation sort the triple tuple (timestamp, ledgerid, entryid) with heap sort algorithm, which is not a stable sort method.
We may meet issue like this:
```
tracker.addMessage(0, 0, 1)
tracker.addMessage(1, 1, 1)
tracker.addMessage(2, 2, 1)
```
These three messages are scheduled to be delivered at the same time, but the dispatch sequence may not be 0, 1, 2 due to the sort algorithm.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org