forked from apache/pulsar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Issue 6433][Pulsar-client]Fix message id compare between MessageId a…
…nd BatchMessageId (apache#6621) link PR: apache#1285 This PR resolve the compare from BatchMessageIdImpl to MessageIdImpl, but didn't consider the symmetry on the other side. Master Issue: apache#6433 Motivation Fix the bug of compare between MessageId and BatchMessageId, keep the symmetry of compareTo method. Modifications In the mothod of compareTo in BatchMessageId class, when compare to non-batched messageId and other properties is equal,if batchIndex >-1, then return 1, so in MessageId class, add the same logic, and if batchIndex >-1, then return -1. Verifying this change Unit tests added.
- Loading branch information
Showing
3 changed files
with
43 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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