Adar Dembo has posted comments on this change. Change subject: master: add read-write lock to serialize operations around elections ......................................................................
Patch Set 4: (2 comments) http://gerrit.cloudera.org:8080/#/c/3550/4/src/kudu/master/catalog_manager.cc File src/kudu/master/catalog_manager.cc: Line 358: // If there is an error (e.g., we are not the leader) abort this task > Should this comment be update? Not necessarily; this master could lose its leadership after taking the lock. It'll find out when trying to replicate to the followers, and that error will propagate up here. Line 3147: std::lock_guard<simple_spinlock> l(catalog_->state_lock_); > I expected these checks to be made 'on demand' in CheckIsInitializedOrRespo For one, some users don't use the CheckIs...() methods; they call the status() accessors only. For two, I modeled this class after lock_guard and shared_lock; I want its users to think that the resource is taken when the class is declared, and released when the instance goes out of scope. -- To view, visit http://gerrit.cloudera.org:8080/3550 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5084c09f1a77ccf620fb6cd621094c4778d636f8 Gerrit-PatchSet: 4 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Adar Dembo <a...@cloudera.com> Gerrit-Reviewer: Adar Dembo <a...@cloudera.com> Gerrit-Reviewer: Dan Burkert <d...@cloudera.com> Gerrit-Reviewer: David Ribeiro Alves <dral...@apache.org> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Todd Lipcon <t...@apache.org> Gerrit-HasComments: Yes