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

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

commit 18c32f0132721ed659fdfd9129d5f42c3aeda69a
Author: Alexey Serbin <[email protected]>
AuthorDate: Thu Apr 11 10:26:49 2019 -0700

    [mini-sentry] do not run the "store-cleaner" thread
    
    In our MiniSentry-based tests we don't need to clean up the store since
    the tests are run from a clean state anyway.  Not starting an extra
    thread slightly improves startup times.  In my experiments about the
    improvement was about ~100 milliseconds with the total startup time
    to hover around 14 seconds.
    
    In addition, this patch contains an update to always report on Sentry
    startup times.  Prior to this patch, that report appeared only if
    it took more than half of the configured timeout interval for Sentry's
    startup.
    
    Change-Id: I908d00d93a9f4cf632899da863275dd01b4a2fad
    Reviewed-on: http://gerrit.cloudera.org:8080/12995
    Tested-by: Kudu Jenkins
    Reviewed-by: Hao Hao <[email protected]>
    Reviewed-by: Andrew Wong <[email protected]>
---
 src/kudu/sentry/mini_sentry.cc | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/kudu/sentry/mini_sentry.cc b/src/kudu/sentry/mini_sentry.cc
index b992d4d..2477b8a 100644
--- a/src/kudu/sentry/mini_sentry.cc
+++ b/src/kudu/sentry/mini_sentry.cc
@@ -82,7 +82,7 @@ void MiniSentry::SetAddress(const HostPort& address) {
 }
 
 Status MiniSentry::Start() {
-  SCOPED_LOG_SLOW_EXECUTION(WARNING, kSentryStartTimeoutMs / 2, "Starting 
Sentry");
+  SCOPED_LOG_TIMING(INFO, "Starting Sentry");
   CHECK(!sentry_process_);
 
   VLOG(1) << "Starting Sentry";
@@ -210,6 +210,11 @@ Status MiniSentry::CreateSentryConfigs(const string& 
tmp_dir) const {
   //    derives OWNER/ALL privileges from object's ownership. 'all' indicates 
an
   //    object owner has OWNER/ALL privilege on the object, but cannot transfer
   //    owner privileges to another user or role.
+  //
+  // - sentry.store.clean.period.seconds
+  //    The interval to run the "store-cleaner" Sentry's thread. Setting to a
+  //    negative value means Sentry will not run the "store-cleaner" thread
+  //    at all and that allows for faster start-up times of the Sentry service.
   static const string kFileTemplate = R"(
 <configuration>
 
@@ -283,6 +288,11 @@ Status MiniSentry::CreateSentryConfigs(const string& 
tmp_dir) const {
     <value>all</value>
   </property>
 
+  <property>
+    <name>sentry.store.clean.period.seconds</name>
+    <value>-1</value>
+  </property>
+
 </configuration>
   )";
 

Reply via email to