You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by to...@apache.org on 2016/07/01 18:53:44 UTC

[1/2] incubator-kudu git commit: Clean up log messages in AsyncKuduSession

Repository: incubator-kudu
Updated Branches:
  refs/heads/master 200b8c286 -> 1ebfa6c66


Clean up log messages in AsyncKuduSession

Change-Id: I0307281234d163d1f1471335171104386ac281e4
Reviewed-on: http://gerrit.cloudera.org:8080/3554
Tested-by: Kudu Jenkins
Reviewed-by: Jean-Daniel Cryans <jd...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kudu/commit/c7ecdf0e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kudu/tree/c7ecdf0e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kudu/diff/c7ecdf0e

Branch: refs/heads/master
Commit: c7ecdf0ef6e771711a51f7384e31bec5ae9daa0b
Parents: 200b8c2
Author: Dan Burkert <da...@cloudera.com>
Authored: Fri Jul 1 10:13:55 2016 -0700
Committer: Jean-Daniel Cryans <jd...@apache.org>
Committed: Fri Jul 1 18:09:51 2016 +0000

----------------------------------------------------------------------
 .../src/main/java/org/kududb/client/AsyncKuduSession.java     | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/c7ecdf0e/java/kudu-client/src/main/java/org/kududb/client/AsyncKuduSession.java
----------------------------------------------------------------------
diff --git a/java/kudu-client/src/main/java/org/kududb/client/AsyncKuduSession.java b/java/kudu-client/src/main/java/org/kududb/client/AsyncKuduSession.java
index a4f126b..3c5daa5 100644
--- a/java/kudu-client/src/main/java/org/kududb/client/AsyncKuduSession.java
+++ b/java/kudu-client/src/main/java/org/kududb/client/AsyncKuduSession.java
@@ -400,7 +400,7 @@ public class AsyncKuduSession implements SessionConfiguration {
    * @return the operation responses
    */
   private Deferred<List<OperationResponse>> doFlush(Buffer buffer) {
-    LOG.info("flushing buffer: {}", buffer);
+    LOG.debug("flushing buffer: {}", buffer);
     if (buffer.getOperations().isEmpty()) {
       // no-op.
       return Deferred.<List<OperationResponse>>fromResult(ImmutableList.<OperationResponse>of());
@@ -548,7 +548,6 @@ public class AsyncKuduSession implements SessionConfiguration {
 
           if (activeBufferSize + 1 >= mutationBufferSpace && inactiveBufferAvailable()) {
             // If the operation filled the buffer, then flush it.
-            LOG.debug("flushing full buffer: {}", activeBuffer);
             fullBuffer = activeBuffer;
             activeBuffer = null;
           } else if (activeBufferSize == 0) {
@@ -585,7 +584,6 @@ public class AsyncKuduSession implements SessionConfiguration {
     Preconditions.checkState(activeBuffer == null);
     activeBuffer = inactiveBuffers.remove();
     activeBuffer.reset();
-    LOG.trace("active buffer refreshed: {}", activeBuffer);
   }
 
   /**
@@ -734,7 +732,7 @@ public class AsyncKuduSession implements SessionConfiguration {
      * successfully flushed.
      */
     public void callbackFlushNotification() {
-      LOG.debug("callbackFlushNotification on {}", flushNotification);
+      LOG.trace("buffer flush notification fired: {}", this);
       flushNotification.callback(null);
     }
 
@@ -744,6 +742,7 @@ public class AsyncKuduSession implements SessionConfiguration {
      */
     @GuardedBy("monitor")
     public void reset() {
+      LOG.trace("buffer reset: {}", this);
       operations.clear();
       flushNotification = new Deferred<>();
       flusherTask = null;


[2/2] incubator-kudu git commit: Try again to disable core dumps in some tests

Posted by to...@apache.org.
Try again to disable core dumps in some tests

133767185047987e1d7f768d09db950dc8e38897 attempted to disable core
dumps in some tests by adding a --disable_core_dumps flag. However,
I had put the handling of this flag in the InitKuduOrDie() function,
which actually is called prior to flags being parsed, so the flag
didn't work as intended.

I noticed that the fix was ineffectual because the tests that were
supposed to be de-flaked by it remained flaky. After setting up
a VM which matched the test environment I noticed that they were
still flaky due to core dumps, and figured out this issue.

The fix is just to move the DisableCoreDumps() call to the spot
where we parse flags.

Change-Id: I51f3d5d8c72622b8a3b8b4a13dd343e864a78db3
Reviewed-on: http://gerrit.cloudera.org:8080/3549
Tested-by: Kudu Jenkins
Reviewed-by: Adar Dembo <ad...@cloudera.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kudu/commit/1ebfa6c6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kudu/tree/1ebfa6c6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kudu/diff/1ebfa6c6

Branch: refs/heads/master
Commit: 1ebfa6c6632674b20e13d6ef125d07c459a73d61
Parents: c7ecdf0
Author: Todd Lipcon <to...@apache.org>
Authored: Thu Jun 30 18:35:32 2016 -0700
Committer: Todd Lipcon <to...@apache.org>
Committed: Fri Jul 1 18:53:30 2016 +0000

----------------------------------------------------------------------
 src/kudu/util/flags.cc |  9 +++++++++
 src/kudu/util/init.cc  | 13 ++-----------
 2 files changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/1ebfa6c6/src/kudu/util/flags.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/flags.cc b/src/kudu/util/flags.cc
index 17e6ee5..1887f9e 100644
--- a/src/kudu/util/flags.cc
+++ b/src/kudu/util/flags.cc
@@ -29,6 +29,7 @@
 #include "kudu/gutil/strings/substitute.h"
 #include "kudu/util/flag_tags.h"
 #include "kudu/util/metrics.h"
+#include "kudu/util/os-util.h"
 #include "kudu/util/path_util.h"
 #include "kudu/util/url-coding.h"
 #include "kudu/util/version_info.h"
@@ -58,6 +59,10 @@ DEFINE_string(heap_profile_path, "", "Output path to store heap profiles. If not
 TAG_FLAG(heap_profile_path, stable);
 TAG_FLAG(heap_profile_path, advanced);
 
+DEFINE_bool(disable_core_dumps, false, "Disable core dumps when this process crashes.");
+TAG_FLAG(disable_core_dumps, advanced);
+TAG_FLAG(disable_core_dumps, evolving);
+
 // Tag a bunch of the flags that we inherit from glog/gflags.
 
 //------------------------------------------------------------
@@ -275,6 +280,10 @@ int ParseCommandLineFlags(int* argc, char*** argv, bool remove_flags) {
         "/tmp/$0.$1", google::ProgramInvocationShortName(), getpid());
   }
 
+  if (FLAGS_disable_core_dumps) {
+    DisableCoreDumps();
+  }
+
 #ifdef TCMALLOC_ENABLED
   if (FLAGS_enable_process_lifetime_heap_profiling) {
     HeapProfilerStart(FLAGS_heap_profile_path.c_str());

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/1ebfa6c6/src/kudu/util/init.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/init.cc b/src/kudu/util/init.cc
index 58c9baa..fa55b05 100644
--- a/src/kudu/util/init.cc
+++ b/src/kudu/util/init.cc
@@ -17,21 +17,14 @@
 
 #include "kudu/util/init.h"
 
-#include <gflags/gflags.h>
 #include <string>
 
 #include "kudu/gutil/cpu.h"
 #include "kudu/gutil/strings/substitute.h"
-#include "kudu/util/flag_tags.h"
-#include "kudu/util/os-util.h"
 #include "kudu/util/status.h"
 
 using std::string;
 
-DEFINE_bool(disable_core_dumps, false, "Disable core dumps when this process crashes.");
-TAG_FLAG(disable_core_dumps, advanced);
-TAG_FLAG(disable_core_dumps, evolving);
-
 namespace kudu {
 
 Status BadCPUStatus(const base::CPU& cpu, const char* instruction_set) {
@@ -57,10 +50,8 @@ Status CheckCPUFlags() {
 
 void InitKuduOrDie() {
   CHECK_OK(CheckCPUFlags());
-
-  if (FLAGS_disable_core_dumps) {
-    DisableCoreDumps();
-  }
+  // NOTE: this function is called before flags are parsed.
+  // Do not add anything in here which is flag-dependent.
 }
 
 } // namespace kudu