HBASE-7342 Split operation without split key incorrectly finds the middle key in off-by-one error (Aleksandr Shulman)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1423110 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4cc31baec3
commit
21594e57ef
|
@ -342,7 +342,7 @@ public class HFileBlockIndex {
|
|||
midKey = Arrays.copyOfRange(b.array(), keyOffset, keyOffset + keyLen);
|
||||
} else {
|
||||
// The middle of the root-level index.
|
||||
midKey = blockKeys[(rootCount - 1) / 2];
|
||||
midKey = blockKeys[rootCount / 2];
|
||||
}
|
||||
|
||||
this.midKey.set(midKey);
|
||||
|
@ -1427,5 +1427,4 @@ public class HFileBlockIndex {
|
|||
public static int getMaxChunkSize(Configuration conf) {
|
||||
return conf.getInt(MAX_CHUNK_SIZE_KEY, DEFAULT_MAX_CHUNK_SIZE);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue