You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by op...@apache.org on 2019/05/30 02:08:29 UTC
[hbase] branch master updated: HBASE-22496 UnsafeAccess.unsafeCopy
should not copy more than UNSAFE_COPY_THRESHOLD on each iteration
This is an automated email from the ASF dual-hosted git repository.
openinx pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/master by this push:
new 25c6cd3 HBASE-22496 UnsafeAccess.unsafeCopy should not copy more than UNSAFE_COPY_THRESHOLD on each iteration
25c6cd3 is described below
commit 25c6cd3a4fb632eb04decac5e1aa0992337e0166
Author: Wellington Chevreuil <we...@gmail.com>
AuthorDate: Wed May 29 17:27:21 2019 +0100
HBASE-22496 UnsafeAccess.unsafeCopy should not copy more than UNSAFE_COPY_THRESHOLD on each iteration
Change-Id: I259bc54a0a5b3474d3c455639c3e9cb1e95c8438
Signed-off-by: huzheng <op...@gmail.com>
---
.../src/main/java/org/apache/hadoop/hbase/util/UnsafeAccess.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/UnsafeAccess.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/UnsafeAccess.java
index 953ad5b..15d3cd5 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/UnsafeAccess.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/UnsafeAccess.java
@@ -333,7 +333,7 @@ public final class UnsafeAccess {
private static void unsafeCopy(Object src, long srcAddr, Object dst, long destAddr, long len) {
while (len > 0) {
long size = (len > UNSAFE_COPY_THRESHOLD) ? UNSAFE_COPY_THRESHOLD : len;
- theUnsafe.copyMemory(src, srcAddr, dst, destAddr, len);
+ theUnsafe.copyMemory(src, srcAddr, dst, destAddr, size);
len -= size;
srcAddr += size;
destAddr += size;