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:34:11 UTC

[hbase] branch branch-1.3 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 branch-1.3
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-1.3 by this push:
     new f23c1c1  HBASE-22496 UnsafeAccess.unsafeCopy should not copy more than UNSAFE_COPY_THRESHOLD on each iteration
f23c1c1 is described below

commit f23c1c1c01823428befd8d21197b003cabab2999
Author: Wellington Chevreuil <we...@gmail.com>
AuthorDate: Thu May 30 10:27:07 2019 +0800

    HBASE-22496 UnsafeAccess.unsafeCopy should not copy more than UNSAFE_COPY_THRESHOLD on each iteration
    
    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 97bce75..fc5ae57 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
@@ -96,7 +96,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;