Hello Todd Lipcon, I'd like you to do a code review. Please visit
http://gerrit.cloudera.org:8080/7543 to review the following change. Change subject: consensus_peers: capture weak refs in functors submitted to thread pools ...................................................................... consensus_peers: capture weak refs in functors submitted to thread pools By capturing weak refs we allow peers to be destroyed earlier, closer to last-user-facing-ref-was-dropped time. While this reduces the amount of "unproductive" submitted tasks processed, I think the real benefit is a clearer expression of lifecycle: we capture weak refs where we do not wish to prolong the Peer's lifespan. Note: this change is less useful than I had hoped due to the continued strong ref capture in async proxy calls. Weak refs don't work there as the krpc subsystem requires response objects to stay alive right up until the supplied callback is invoked. Change-Id: I6dbb777e7e141f1f5bf48026779f1d4b26185195 --- M src/kudu/consensus/consensus_peers.cc M src/kudu/consensus/consensus_peers.h 2 files changed, 40 insertions(+), 28 deletions(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/43/7543/1 -- To view, visit http://gerrit.cloudera.org:8080/7543 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6dbb777e7e141f1f5bf48026779f1d4b26185195 Gerrit-PatchSet: 1 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Adar Dembo <a...@cloudera.com> Gerrit-Reviewer: Todd Lipcon <t...@apache.org>