Skip to content

Commit

Permalink
[Java] Correct comparison order for appended message test against clu…
Browse files Browse the repository at this point in the history
…ster commit position.
  • Loading branch information
mjpt777 committed Jul 18, 2019
1 parent cc5dfed commit 50aeaf0
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2657,10 +2657,9 @@ private boolean leaderServiceSessionMessageSweeper(
final int timestampOffset = headerOffset + SessionMessageHeaderDecoder.timestampEncodingOffset();
final long appendPosition = buffer.getLong(timestampOffset, SessionMessageHeaderDecoder.BYTE_ORDER);

if (appendPosition >= commitPosition.getWeak())
if (commitPosition.getWeak() >= appendPosition)
{
--uncommittedServiceMessages;

return true;
}

Expand Down

0 comments on commit 50aeaf0

Please sign in to comment.