Todd Lipcon has posted comments on this change.

Change subject: KUDU-1192 Periodically flush glog buffers from a thread
......................................................................


Patch Set 1:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/6853/1/src/kudu/util/async_logger.cc
File src/kudu/util/async_logger.cc:

Line 34: const char* kAsyncLoggerTimerEnvVar = "KUDU_ASYNC_LOGGER_TIMER";
rather than using an env var, should use a gflag for the period at which this 
is flushed. We can probably just reuse the existing FLAGS_logbufsecs in fact


Line 54:   timer_thread_ = std::thread(&AsyncLogger::RunTimer, this);
instead of a separate thread, why not just change the existing thread so that 
instead of doing a Wait() with no timeout, it does a Wait() with a timeout of 
logbufsecs and then wakes up and flushes even if nothing has been enqueued?


Line 148:       wake_flusher_cond_.Wait();
eg here you can use a TimedWait, and if it times out, set active_buf_->flush = 
true


-- 
To view, visit http://gerrit.cloudera.org:8080/6853
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id4c6d440e9259efcf222530f13137f7de5bf00fc
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: William Li <[email protected]>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <[email protected]>
Gerrit-HasComments: Yes

Reply via email to