horizonzy commented on code in PR #3800:
URL: https://github.com/apache/bookkeeper/pull/3800#discussion_r1115339458
##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/ldb/ArrayGroupSort.java:
##########
@@ -61,11 +61,13 @@ private void quickSort(long[] array, int low, int high) {
}
private int partition(long[] array, int low, int high) {
- int pivotIdx = high;
+ int mid = low + (high - low) / 2;
Review Comment:
Here the `mid` may not be a multiple of `groupSize`, that will introduce
incorrect swap.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]