Hello Adar Dembo,
I'd like you to do a code review. Please visit
http://gerrit.cloudera.org:8080/6916
to review the following change.
Change subject: KUDU-1125 (part 1) catalog_manager: try to avoid unnecessarily
rewriting tablet info
......................................................................
KUDU-1125 (part 1) catalog_manager: try to avoid unnecessarily rewriting tablet
info
This adds a flag on CowObject locks to track whether the mutable data
field has ever been accessed. In the case that it's not accessed, we can
guarantee that the underlying object didn't change, in which case it's
safe to avoid writing it to disk during a tablet report.
This is a simple way of short-circuiting a common case of unnecessary
slowness in tablet report processing.
I manually verified that, if I restarted a master with a single TS
reporting to it, when it came back up, it was able to skip writes to
disk when receiving tablet reports redundant with existing information.
This doesn't achieve all of the goals of KUDU-1125 (we still do separate
sync writes for each reported tablet) but should still be a substantial
reduction. Perhaps most importantly, if a heartbeat from a tserver times
out due to long processing, the retry from the TS should hit this code
path and therefore be processed quickly.
Change-Id: I0de7189b8f1dbeea55172929396b73fd92fd62ba
---
M src/kudu/master/catalog_manager.cc
M src/kudu/util/cow_object.h
2 files changed, 36 insertions(+), 14 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/16/6916/1
--
To view, visit http://gerrit.cloudera.org:8080/6916
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0de7189b8f1dbeea55172929396b73fd92fd62ba
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>