Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/17684 )
Change subject: [catalog_manager] introduce --min_num_replicas flag ...................................................................... Patch Set 3: (4 comments) http://gerrit.cloudera.org:8080/#/c/17684/3/src/kudu/client/client-test.cc File src/kudu/client/client-test.cc: http://gerrit.cloudera.org:8080/#/c/17684/3/src/kudu/client/client-test.cc@5372 PS3, Line 5372: ); > nit: maybe print the error, now that we're not going to see it with the ASS Done http://gerrit.cloudera.org:8080/#/c/17684/3/src/kudu/master/catalog_manager.cc File src/kudu/master/catalog_manager.cc: http://gerrit.cloudera.org:8080/#/c/17684/3/src/kudu/master/catalog_manager.cc@487 PS3, Line 487: if (FLAGS_max_num_replicas % 2 == 0 && > I don't know how I didn't see that, sorry... ah, that's not a problem at all -- I thought I might be missing something :) http://gerrit.cloudera.org:8080/#/c/17684/3/src/kudu/master/catalog_manager.cc@479 PS3, Line 479: if (FLAGS_min_num_replicas % 2 == 0 && : !FLAGS_allow_unsafe_replication_factor) { : LOG(ERROR) << Substitute( : "--min_num_replicas ($0) must not be an even number since " : "--allow_unsafe_replication_factor is not set", : FLAGS_min_num_replicas); : return false; : } : if (FLAGS_max_num_replicas % 2 == 0 && : !FLAGS_allow_unsafe_replication_factor) { : LOG(ERROR) << Substitute( : "--max_num_replicas ($0) must not be an even number since " : "--allow_unsafe_replication_factor is not set", : FLAGS_max_num_replicas); : return false; : } > It seems more natural to check that --default_num_replicas for evenness, ra Yep, that makes sense: I added the non-evenness check for --default_num_replicas as well. I think it's worth keeping the non-evenness check for min/max: otherwise it would be necessary to update error messages to suggest correct replication factor if case of a violation of the tmin/max constraint while creating a table. http://gerrit.cloudera.org:8080/#/c/17684/3/src/kudu/master/catalog_manager.cc@497 PS3, Line 497: should > +1 This makes sense, indeed. I updated the code accordingly. -- To view, visit http://gerrit.cloudera.org:8080/17684 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I86191fcdc1b4ed6670f33ba7176d28dbd1df541f Gerrit-Change-Number: 17684 Gerrit-PatchSet: 3 Gerrit-Owner: Alexey Serbin <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Attila Bukor <[email protected]> Gerrit-Reviewer: Grant Henke <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Tidy Bot (241) Gerrit-Comment-Date: Fri, 16 Jul 2021 04:49:10 +0000 Gerrit-HasComments: Yes
