Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/14222 )
Change subject: KUDU-2069 p4: stop replication from failed servers in maintenance mode ...................................................................... Patch Set 2: (1 comment) http://gerrit.cloudera.org:8080/#/c/14222/2/src/kudu/master/ts_manager.h File src/kudu/master/ts_manager.h: http://gerrit.cloudera.org:8080/#/c/14222/2/src/kudu/master/ts_manager.h@94 PS2, Line 94: void GetWhitelistedUuids(std::unordered_set<std::string>* uuids) const; > Not sure I understand why that would be any better than generating the list If O(num tservers in maintenance mode) is relatively high, GetWhitelistedUuids will take a lot of locks. The acquisitions are one-at-a-time, but it's possible it's still computationally more expensive than ~3 TSManager lookups in ShouldAddReplica. With the change to only call GetWhitelistedUuids once per heartbeat vs. one per reported tablet, it's probably better than lookups in ShouldAddReplica _for full reports_. But what about incremental reports, which may only include a few tablets? As for the name, maybe it'd be clearer if you shifted the complexity to ShouldAddReplica by calling the method GetMaintenanceModeTServers. Then ShouldAddReplica gets to explain how/why MM affects rereplication, but since that area of code is already dealing with that concept, it's more natural for the full explanation to also live there. -- To view, visit http://gerrit.cloudera.org:8080/14222 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I9a63b55011d16900c0d27eac0eb75880074204db Gerrit-Change-Number: 14222 Gerrit-PatchSet: 2 Gerrit-Owner: Andrew Wong <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Hao Hao <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Comment-Date: Mon, 16 Sep 2019 23:12:46 +0000 Gerrit-HasComments: Yes
