Adar Dembo has posted comments on this change. Change subject: c++ client: try harder to pass table IDs into RPCs that can accept them ......................................................................
Patch Set 2: (5 comments) http://gerrit.cloudera.org:8080/#/c/8066/2/src/kudu/client/client-internal.cc File src/kudu/client/client-internal.cc: PS2, Line 466: if (mode == TableIdentificationMode::ID) { : req.mutable_table()->set_table_id(table_identifier); : } else if (mode == TableIdentificationMode::NAME) { : req.mutable_table()->set_table_name(table_identifier); : } else { : LOG(FATAL) << "Unknown table identification mode"; : } > nit: consider switch/case/default Moot; TableIdentificationMode doesn't exist anymore. http://gerrit.cloudera.org:8080/#/c/8066/2/src/kudu/client/client-internal.h File src/kudu/client/client-internal.h: PS2, Line 82: ID > maybe worth it to use "UUID" here? Moot point: this is all disambiguated via master::TableIdentifierPB now. PS2, Line 116: table_identifier > Nit: another option might be introducing a special type TableIdentifier, wh Thanks everyone for the feedback. To disambiguate, I decided to go in an entirely different direction: I plumbed master::TableIdentifierPB through these private functions. http://gerrit.cloudera.org:8080/#/c/8066/2/src/kudu/client/client.cc File src/kudu/client/client.cc: Line 1145: CHECK(resp.has_table_id()); > why not just return some kind of bad status here indicating that probably t OK, I'll return a bad Status instead. http://gerrit.cloudera.org:8080/#/c/8066/2/src/kudu/integration-tests/alter_table-test.cc File src/kudu/integration-tests/alter_table-test.cc: PS2, Line 2089: // Because the logic that waits for table creation to finish uses table IDs, : // the rename shouldn't interfere with it. > maybe refer the bug fix, i.e that if we're incorrectly waiting on the table Done -- To view, visit http://gerrit.cloudera.org:8080/8066 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0052d18f714aee1226b96bf1da9defa5738fdd37 Gerrit-PatchSet: 2 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Adar Dembo <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Dan Burkert <[email protected]> Gerrit-Reviewer: David Ribeiro Alves <[email protected]> Gerrit-Reviewer: Jean-Daniel Cryans <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Todd Lipcon <[email protected]> Gerrit-HasComments: Yes
