You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by ad...@apache.org on 2019/05/27 22:07:17 UTC

[kudu] branch master updated (de12c3d -> 84a6137)

This is an automated email from the ASF dual-hosted git repository.

adar pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git.


    from de12c3d  hms plugin: don't expect table type
     new 3ae2e1a  java: fix errorprone warnings
     new 58d8772  nvm_cache: fix initialization order warning
     new 84a6137  thirdparty: upgrade libunwind to 1.3.1

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/kudu/client/AsyncKuduSession.java   |  2 -
 .../org/apache/kudu/client/ListTablesResponse.java |  2 +-
 src/kudu/util/nvm_cache.cc                         |  5 +--
 thirdparty/download-thirdparty.sh                  |  3 +-
 ...-directly-in-write_validate-to-avoid-ASAN.patch | 43 ----------------------
 thirdparty/vars.sh                                 |  2 +-
 6 files changed, 5 insertions(+), 52 deletions(-)
 delete mode 100644 thirdparty/patches/libunwind-Use-syscall-directly-in-write_validate-to-avoid-ASAN.patch


[kudu] 02/03: nvm_cache: fix initialization order warning

Posted by ad...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

adar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git

commit 58d8772e97e26e47ca7c87a257daedb556e0785d
Author: Adar Dembo <ad...@cloudera.com>
AuthorDate: Sun May 26 19:56:41 2019 -0700

    nvm_cache: fix initialization order warning
    
    Change-Id: I6eb34de666c7000e740f0345b3abf876a84247dc
    Reviewed-on: http://gerrit.cloudera.org:8080/13441
    Reviewed-by: Andrew Wong <aw...@cloudera.com>
    Tested-by: Adar Dembo <ad...@cloudera.com>
---
 src/kudu/util/nvm_cache.cc | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/kudu/util/nvm_cache.cc b/src/kudu/util/nvm_cache.cc
index cde012c..208aee4 100644
--- a/src/kudu/util/nvm_cache.cc
+++ b/src/kudu/util/nvm_cache.cc
@@ -535,9 +535,8 @@ class ShardedLRUCache : public Cache {
 
  public:
   explicit ShardedLRUCache(size_t capacity, const string& /*id*/, memkind* vmp)
-        : vmp_(vmp),
-          shard_bits_(DetermineShardBits()) {
-
+      : shard_bits_(DetermineShardBits()),
+        vmp_(vmp) {
     int num_shards = 1 << shard_bits_;
     const size_t per_shard = (capacity + (num_shards - 1)) / num_shards;
     for (int s = 0; s < num_shards; s++) {


[kudu] 01/03: java: fix errorprone warnings

Posted by ad...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

adar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git

commit 3ae2e1ace73bc05d5cc739e166ec64b1a719c5e4
Author: Adar Dembo <ad...@cloudera.com>
AuthorDate: Thu May 23 21:56:54 2019 -0700

    java: fix errorprone warnings
    
    kudu-client/src/main/java/org/apache/kudu/client/ListTablesResponse.java:85: warning: [EqualsGetClass] Overriding Object#equals in a non-final class by using getClass rather than instanceof breaks substitutability of subclasses.
        public boolean equals(Object o) {
                       ^
    
    kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduSession.java:118: warning: [UnusedVariable] The field 'PERCENTAGE_RANGE' is never read.
      private static final Range<Float> PERCENTAGE_RANGE = Range.closed(0.0f, 1.0f);
                                        ^
        (see https://errorprone.info/bugpattern/UnusedVariable)
      Did you mean to remove this line or 'static { Range.closed(0.0f, 1.0f); }'?
    
    Change-Id: Ifbd36b2bbd7b591b08661838d68584f152b1aaab
    Reviewed-on: http://gerrit.cloudera.org:8080/13431
    Reviewed-by: Andrew Wong <aw...@cloudera.com>
    Tested-by: Adar Dembo <ad...@cloudera.com>
---
 .../src/main/java/org/apache/kudu/client/AsyncKuduSession.java          | 2 --
 .../src/main/java/org/apache/kudu/client/ListTablesResponse.java        | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduSession.java b/java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduSession.java
index c563248..f3d6d87 100644
--- a/java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduSession.java
+++ b/java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduSession.java
@@ -35,7 +35,6 @@ import javax.annotation.concurrent.NotThreadSafe;
 import com.google.common.base.MoreObjects;
 import com.google.common.base.Preconditions;
 import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Range;
 import com.stumbleupon.async.Callback;
 import com.stumbleupon.async.Deferred;
 import org.apache.kudu.client.AsyncKuduClient.LookupType;
@@ -115,7 +114,6 @@ import org.apache.kudu.util.Slice;
 public class AsyncKuduSession implements SessionConfiguration {
 
   public static final Logger LOG = LoggerFactory.getLogger(AsyncKuduSession.class);
-  private static final Range<Float> PERCENTAGE_RANGE = Range.closed(0.0f, 1.0f);
 
   private final AsyncKuduClient client;
   private final Random randomizer = new Random();
diff --git a/java/kudu-client/src/main/java/org/apache/kudu/client/ListTablesResponse.java b/java/kudu-client/src/main/java/org/apache/kudu/client/ListTablesResponse.java
index 4ddcf44..f659a28 100644
--- a/java/kudu-client/src/main/java/org/apache/kudu/client/ListTablesResponse.java
+++ b/java/kudu-client/src/main/java/org/apache/kudu/client/ListTablesResponse.java
@@ -84,7 +84,7 @@ public class ListTablesResponse extends KuduRpcResponse {
     @Override
     public boolean equals(Object o) {
       if (this == o) return true;
-      if (o == null || getClass() != o.getClass()) return false;
+      if (!(o instanceof TableInfo)) return false;
       TableInfo tableInfo = (TableInfo) o;
       return Objects.equal(tableId, tableInfo.tableId) &&
           Objects.equal(tableName, tableInfo.tableName);


[kudu] 03/03: thirdparty: upgrade libunwind to 1.3.1

Posted by ad...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

adar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git

commit 84a6137a879d61fd468cc605a771f507419a6820
Author: Adar Dembo <ad...@cloudera.com>
AuthorDate: Sun May 26 11:57:20 2019 -0700

    thirdparty: upgrade libunwind to 1.3.1
    
    This fixes a bug[1] that prevents libunwind from being built with modern
    versions of the gold and LLD linkers. The update includes one of our custom
    patches, but not the other.
    
    1. https://github.com/libunwind/libunwind/issues/58
    
    Change-Id: If810954d80c63dca4b350defc2c1b915ad4d06f4
    Reviewed-on: http://gerrit.cloudera.org:8080/13439
    Reviewed-by: Andrew Wong <aw...@cloudera.com>
    Tested-by: Adar Dembo <ad...@cloudera.com>
---
 thirdparty/download-thirdparty.sh                  |  3 +-
 ...-directly-in-write_validate-to-avoid-ASAN.patch | 43 ----------------------
 thirdparty/vars.sh                                 |  2 +-
 3 files changed, 2 insertions(+), 46 deletions(-)

diff --git a/thirdparty/download-thirdparty.sh b/thirdparty/download-thirdparty.sh
index d4213ff..d883884 100755
--- a/thirdparty/download-thirdparty.sh
+++ b/thirdparty/download-thirdparty.sh
@@ -304,12 +304,11 @@ fetch_and_patch \
  $CRCUTIL_PATCHLEVEL \
  "patch -p0 < $TP_DIR/patches/crcutil-fix-libtoolize-on-osx.patch"
 
-LIBUNWIND_PATCHLEVEL=2
+LIBUNWIND_PATCHLEVEL=1
 fetch_and_patch \
  libunwind-${LIBUNWIND_VERSION}.tar.gz \
  $LIBUNWIND_SOURCE \
  $LIBUNWIND_PATCHLEVEL \
- "patch -p1 < $TP_DIR/patches/libunwind-Use-syscall-directly-in-write_validate-to-avoid-ASAN.patch" \
  "patch -p1 < $TP_DIR/patches/libunwind-trace-cache-destructor.patch"
 
 PYTHON_PATCHLEVEL=0
diff --git a/thirdparty/patches/libunwind-Use-syscall-directly-in-write_validate-to-avoid-ASAN.patch b/thirdparty/patches/libunwind-Use-syscall-directly-in-write_validate-to-avoid-ASAN.patch
deleted file mode 100644
index ef68266..0000000
--- a/thirdparty/patches/libunwind-Use-syscall-directly-in-write_validate-to-avoid-ASAN.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 7d6cc6696ab8a808da3dbe23ca2493ddf2799b56 Mon Sep 17 00:00:00 2001
-From: Dave Watson <da...@fb.com>
-Date: Wed, 17 Jan 2018 08:04:05 -0800
-Subject: [PATCH 1/1] Use syscall directly in write_validate to avoid ASAN
- errors
-
-ASAN will complain about this write call with the following error:
-
-ERROR: AddressSanitizer: stack-buffer-underflow on address
-HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext
-
-This is similar to what google's abseil does to work around the issue.
-
-Reported-by: qiwang@fb.com
----
- src/x86_64/Ginit.c | 4 +++-
- 2 files changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/src/x86_64/Ginit.c b/src/x86_64/Ginit.c
-index 6281b76..2a84a1e 100644
---- a/src/x86_64/Ginit.c
-+++ b/src/x86_64/Ginit.c
-@@ -34,6 +34,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  */
- #include <stdlib.h>
- #include <string.h>
- #include <sys/mman.h>
-+#include <sys/syscall.h>
- 
- #include "unwind_i.h"
- 
-@@ -107,7 +108,8 @@ write_validate (void *addr)
- 
-   do
-     {
--      ret = write (mem_validate_pipe[1], addr, 1);
-+      /* use syscall insteadof write() so that ASAN does not complain */
-+      ret = syscall (SYS_write, mem_validate_pipe[1], addr, 1);
-     }
-   while ( errno == EINTR );
- 
--- 
-2.7.4
-
diff --git a/thirdparty/vars.sh b/thirdparty/vars.sh
index a291e36..fd8a82b 100644
--- a/thirdparty/vars.sh
+++ b/thirdparty/vars.sh
@@ -138,7 +138,7 @@ CRCUTIL_VERSION=42148a6df6986a257ab21c80f8eca2e54544ac4d
 CRCUTIL_NAME=crcutil-$CRCUTIL_VERSION
 CRCUTIL_SOURCE=$TP_SOURCE_DIR/$CRCUTIL_NAME
 
-LIBUNWIND_VERSION=1.3-rc1
+LIBUNWIND_VERSION=1.3.1
 LIBUNWIND_NAME=libunwind-$LIBUNWIND_VERSION
 LIBUNWIND_SOURCE=$TP_SOURCE_DIR/$LIBUNWIND_NAME