Todd Lipcon has submitted this change and it was merged.

Change subject: log: fix some incorrect assumptions on BlockingQueue shutdown
......................................................................


log: fix some incorrect assumptions on BlockingQueue shutdown

There was an incorrect comment in the Log::AppendThread body in which it
claimed that BlockingQueue::Drain would potentially return false and
also return elements at the same time.

This was in fact not the case. This patch adds unit tests to verify
the actual behavior, and simplifies the code accordingly.

Change-Id: I43e1304ce242f2def26a29504b76bb3e74a93ca3
Reviewed-on: http://gerrit.cloudera.org:8080/6855
Reviewed-by: Adar Dembo <[email protected]>
Tested-by: Kudu Jenkins
---
M src/kudu/consensus/log.cc
M src/kudu/util/blocking_queue-test.cc
M src/kudu/util/blocking_queue.h
3 files changed, 35 insertions(+), 10 deletions(-)

Approvals:
  Adar Dembo: Looks good to me, approved
  Kudu Jenkins: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I43e1304ce242f2def26a29504b76bb3e74a93ca3
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <[email protected]>

Reply via email to