Todd Lipcon has submitted this change and it was merged.

Change subject: log: shut down appender thread when idle
......................................................................


log: shut down appender thread when idle

This changes the log appender thread to be based on submitting tasks to a pool,
rather than a thread which is always running.

See the comments on Log::AppendThread in log.cc for notes on the design.

This also adds a new test case in mt-log-test which triggers the various
complexities of the appender lifecycle. I manually checked coverage using
LOG(WARNING) statements to make sure it does exercise the various cases.

Change-Id: Id40a4cfcec96198b537c2f50be7ff1204faf96d2
Reviewed-on: http://gerrit.cloudera.org:8080/6856
Reviewed-by: Adar Dembo <a...@cloudera.com>
Tested-by: Todd Lipcon <t...@apache.org>
---
M src/kudu/consensus/log-test-base.h
M src/kudu/consensus/log-test.cc
M src/kudu/consensus/log.cc
M src/kudu/consensus/log.h
M src/kudu/consensus/mt-log-test.cc
M src/kudu/util/blocking_queue-test.cc
M src/kudu/util/blocking_queue.h
M src/kudu/util/threadpool.h
8 files changed, 301 insertions(+), 102 deletions(-)

Approvals:
  Adar Dembo: Looks good to me, approved
  Todd Lipcon: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id40a4cfcec96198b537c2f50be7ff1204faf96d2
Gerrit-PatchSet: 5
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <t...@apache.org>
Gerrit-Reviewer: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <t...@apache.org>

Reply via email to