Skip to content

Commit

Permalink
[ISSUE #6587] fix getMax() in SparseConsumeQueue
Browse files Browse the repository at this point in the history
Co-authored-by: guyinyou <[email protected]>
  • Loading branch information
guyinyou and guyinyou committed Apr 14, 2023
1 parent d34a28b commit d3a8fe0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ private <T> T getMax(MappedFile mappedFile, Function<ByteBuffer, T> function) {
short batchSize = byteBuffer.getShort();
if (offset >= 0 && size > 0 && msgBaseOffset >= 0 && batchSize > 0) {
byteBuffer.position(i); //reset position
return function.apply(byteBuffer);
return function.apply(byteBuffer.slice());
}
}

Expand Down

0 comments on commit d3a8fe0

Please sign in to comment.