You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Adar Dembo (Code Review)" <ge...@cloudera.org> on 2017/09/14 04:53:57 UTC
[kudu-CR] c++ client: try harder to pass table IDs into RPCs that can accept them
Hello Dan Burkert, Jean-Daniel Cryans, Todd Lipcon,
I'd like you to do a code review. Please visit
http://gerrit.cloudera.org:8080/8066
to review the following change.
Change subject: c++ client: try harder to pass table IDs into RPCs that can accept them
......................................................................
c++ client: try harder to pass table IDs into RPCs that can accept them
Some RPCs (such as IsCreateTableDone or IsAlterTableDone) can identify a
table by name or by ID. Using an ID is more robust since it's globally
unique and immutable. This patch changes several RPC calls to use table IDs.
Note: table IDs were only added to AlterTableResponsePB in Kudu 0.10. By
using them here, the C++ client may crash when altering tables belonging to
an older deployment.
Change-Id: I0052d18f714aee1226b96bf1da9defa5738fdd37
---
M src/kudu/client/client-internal.cc
M src/kudu/client/client-internal.h
M src/kudu/client/client.cc
M src/kudu/integration-tests/alter_table-test.cc
M src/kudu/integration-tests/master_failover-itest.cc
5 files changed, 117 insertions(+), 39 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/66/8066/1
--
To view, visit http://gerrit.cloudera.org:8080/8066
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0052d18f714aee1226b96bf1da9defa5738fdd37
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
[kudu-CR] c++ client: try harder to pass table IDs into RPCs that can accept them
Posted by "David Ribeiro Alves (Code Review)" <ge...@cloudera.org>.
David Ribeiro Alves 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
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?
PS2, Line 116: const std::string& table_identifier,
actually now I understand the difference, not obvious at the first read though. maybe call this "table_id" and then use "table_uuid" or "table_name" or somesuch?
PS2, Line 116: table_identifier
nit: use table_id like in the method below.
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 name then this test will fail
--
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 <ad...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes
[kudu-CR] c++ client: try harder to pass table IDs into RPCs that can accept them
Posted by "David Ribeiro Alves (Code Review)" <ge...@cloudera.org>.
David Ribeiro Alves has posted comments on this change.
Change subject: c++ client: try harder to pass table IDs into RPCs that can accept them
......................................................................
Patch Set 3:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/8066/3/src/kudu/client/client-internal.cc
File src/kudu/client/client-internal.cc:
PS3, Line 465: *req.mutable_table() = std::move(table);
iirc you can use mutable_table()->Swap(&table) here
--
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: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes
[kudu-CR] c++ client: try harder to pass table IDs into RPCs that can accept them
Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/8066
to look at the new patch set (#2).
Change subject: c++ client: try harder to pass table IDs into RPCs that can accept them
......................................................................
c++ client: try harder to pass table IDs into RPCs that can accept them
Some RPCs (such as IsCreateTableDone or IsAlterTableDone) can identify a
table by name or by ID. Using an ID is more robust since it's globally
unique and immutable. This patch changes several RPC calls to use table IDs.
Note: table IDs were only added to AlterTableResponsePB in Kudu 0.10. By
using them here, the C++ client may crash when altering tables belonging to
an older deployment.
Change-Id: I0052d18f714aee1226b96bf1da9defa5738fdd37
---
M src/kudu/client/client-internal.cc
M src/kudu/client/client-internal.h
M src/kudu/client/client.cc
M src/kudu/integration-tests/alter_table-test.cc
M src/kudu/integration-tests/master_failover-itest.cc
5 files changed, 116 insertions(+), 52 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/66/8066/2
--
To view, visit http://gerrit.cloudera.org:8080/8066
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I0052d18f714aee1226b96bf1da9defa5738fdd37
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
[kudu-CR] c++ client: try harder to pass table IDs into RPCs that can accept them
Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has submitted this change and it was merged.
Change subject: c++ client: try harder to pass table IDs into RPCs that can accept them
......................................................................
c++ client: try harder to pass table IDs into RPCs that can accept them
Some RPCs (such as IsCreateTableDone or IsAlterTableDone) can identify a
table by name or by ID. Using an ID is more robust since it's globally
unique and immutable. This patch changes several RPC calls to use table IDs.
Note: table IDs were only added to AlterTableResponsePB in Kudu 0.10. By
using them here, the C++ client may crash when altering tables belonging to
an older deployment.
Change-Id: I0052d18f714aee1226b96bf1da9defa5738fdd37
Reviewed-on: http://gerrit.cloudera.org:8080/8066
Tested-by: Kudu Jenkins
Reviewed-by: Alexey Serbin <as...@cloudera.com>
Reviewed-by: David Ribeiro Alves <da...@gmail.com>
---
M src/kudu/client/client-internal.cc
M src/kudu/client/client-internal.h
M src/kudu/client/client.cc
M src/kudu/client/client.h
M src/kudu/integration-tests/alter_table-test.cc
M src/kudu/integration-tests/master_failover-itest.cc
6 files changed, 113 insertions(+), 60 deletions(-)
Approvals:
David Ribeiro Alves: Looks good to me, approved
Alexey Serbin: Looks good to me, but someone else must approve
Kudu Jenkins: Verified
--
To view, visit http://gerrit.cloudera.org:8080/8066
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I0052d18f714aee1226b96bf1da9defa5738fdd37
Gerrit-PatchSet: 5
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
[kudu-CR] c++ client: try harder to pass table IDs into RPCs that can accept them
Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Hello Alexey Serbin, Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/8066
to look at the new patch set (#3).
Change subject: c++ client: try harder to pass table IDs into RPCs that can accept them
......................................................................
c++ client: try harder to pass table IDs into RPCs that can accept them
Some RPCs (such as IsCreateTableDone or IsAlterTableDone) can identify a
table by name or by ID. Using an ID is more robust since it's globally
unique and immutable. This patch changes several RPC calls to use table IDs.
Note: table IDs were only added to AlterTableResponsePB in Kudu 0.10. By
using them here, the C++ client may crash when altering tables belonging to
an older deployment.
Change-Id: I0052d18f714aee1226b96bf1da9defa5738fdd37
---
M src/kudu/client/client-internal.cc
M src/kudu/client/client-internal.h
M src/kudu/client/client.cc
M src/kudu/client/client.h
M src/kudu/integration-tests/alter_table-test.cc
M src/kudu/integration-tests/master_failover-itest.cc
6 files changed, 113 insertions(+), 60 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/66/8066/3
--
To view, visit http://gerrit.cloudera.org:8080/8066
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I0052d18f714aee1226b96bf1da9defa5738fdd37
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
[kudu-CR] c++ client: try harder to pass table IDs into RPCs that can accept them
Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
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 <ad...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes
[kudu-CR] c++ client: try harder to pass table IDs into RPCs that can accept them
Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
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 3:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/8066/3/src/kudu/client/client-internal.cc
File src/kudu/client/client-internal.cc:
PS3, Line 465: *req.mutable_table() = std::move(table);
> iirc you can use mutable_table()->Swap(&table) here
I think I'm just going to ignore these warnings.
I can't reproduce them locally with `make tidy`, and I verified in a quick unit test that *foo.mutable_bar() = std::move(bar) triggers a real move (I added abort() to the generated move constructor/assignment operator and the test crashed).
--
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: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes
[kudu-CR] c++ client: try harder to pass table IDs into RPCs that can accept them
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change.
Change subject: c++ client: try harder to pass table IDs into RPCs that can accept them
......................................................................
Patch Set 4: Code-Review+1
--
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: 4
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No
[kudu-CR] c++ client: try harder to pass table IDs into RPCs that can accept them
Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon 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:
(2 comments)
http://gerrit.cloudera.org:8080/#/c/8066/2/src/kudu/client/client-internal.h
File src/kudu/client/client-internal.h:
PS2, Line 116: table_identifier
> nit: use table_id like in the method below.
maybe 'table_ref' to make it less confusing? ie a 'reference' is either an ID or a name. Or maybe table_specifier
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 the client is connecting to a very old server? I think that's preferable to crashing, in the context of a client which might be embedded in some other app.
At the very least let's add a more useful CHECK message
--
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 <ad...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes
[kudu-CR] c++ client: try harder to pass table IDs into RPCs that can accept them
Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Dan Burkert 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:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/8066/2/src/kudu/client/client-internal.h
File src/kudu/client/client-internal.h:
PS2, Line 116: table_identifier
> Thanks everyone for the feedback.
+1
--
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 <ad...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes
[kudu-CR] c++ client: try harder to pass table IDs into RPCs that can accept them
Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Dan Burkert has posted comments on this change.
Change subject: c++ client: try harder to pass table IDs into RPCs that can accept them
......................................................................
Patch Set 3:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/8066/3/src/kudu/client/client-internal.cc
File src/kudu/client/client-internal.cc:
PS3, Line 465: *req.mutable_table() = std::move(table);
> I think I'm just going to ignore these warnings.
They seem to be gone in R4. Very odd.
--
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: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes
[kudu-CR] c++ client: try harder to pass table IDs into RPCs that can accept them
Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
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 1:
(2 comments)
http://gerrit.cloudera.org:8080/#/c/8066/1/src/kudu/client/client.cc
File src/kudu/client/client.cc:
PS1, Line 1145: CHECK(resp.has_table_id());
> Would it make sense to use the name of the table passed into the constructo
We could, but the version of Kudu that doesn't return a table ID in AlterTableResponsePB is so old (0.9) that I don't think it merits even several lines of fallback behavior.
http://gerrit.cloudera.org:8080/#/c/8066/1/src/kudu/integration-tests/master_failover-itest.cc
File src/kudu/integration-tests/master_failover-itest.cc:
PS1, Line 205: MonoTime now;
: do {
: bool create_in_progress;
: ASSERT_OK(client_->IsCreateTableInProgress(kTableName, &create_in_progress));
: if (!create_in_progress) {
: break;
: }
: SleepFor(MonoDelta::FromMilliseconds(100));
: now = MonoTime::Now();
: } while (now < deadline);
: ASSERT_TRUE(now < deadline) << "Timed out waiting for CreateTable to finish";
> Could ASSERT_EVENTUALLY() fit here?
Good idea.
I used it below as well.
--
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: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes
[kudu-CR] c++ client: try harder to pass table IDs into RPCs that can accept them
Posted by "David Ribeiro Alves (Code Review)" <ge...@cloudera.org>.
David Ribeiro Alves has posted comments on this change.
Change subject: c++ client: try harder to pass table IDs into RPCs that can accept them
......................................................................
Patch Set 4: Code-Review+2
--
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: 4
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No
[kudu-CR] c++ client: try harder to pass table IDs into RPCs that can accept them
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change.
Change subject: c++ client: try harder to pass table IDs into RPCs that can accept them
......................................................................
Patch Set 1:
(2 comments)
http://gerrit.cloudera.org:8080/#/c/8066/1/src/kudu/client/client.cc
File src/kudu/client/client.cc:
PS1, Line 1145: CHECK(resp.has_table_id());
Would it make sense to use the name of the table passed into the constructor of the object in that case (KuduTableAlterer::KuduTableAlterer(KuduClient* client, const string& name)) instead of crashing?
http://gerrit.cloudera.org:8080/#/c/8066/1/src/kudu/integration-tests/master_failover-itest.cc
File src/kudu/integration-tests/master_failover-itest.cc:
PS1, Line 205: MonoTime now;
: do {
: bool create_in_progress;
: ASSERT_OK(client_->IsCreateTableInProgress(kTableName, &create_in_progress));
: if (!create_in_progress) {
: break;
: }
: SleepFor(MonoDelta::FromMilliseconds(100));
: now = MonoTime::Now();
: } while (now < deadline);
: ASSERT_TRUE(now < deadline) << "Timed out waiting for CreateTable to finish";
Could ASSERT_EVENTUALLY() fit here?
--
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: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes
[kudu-CR] c++ client: try harder to pass table IDs into RPCs that can accept them
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin 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: Code-Review+1
(1 comment)
LGTM, but perhaps Todd or JD need to approve the introduced 'incompatibility' with pre-0.10 servers.
http://gerrit.cloudera.org:8080/#/c/8066/1/src/kudu/client/client.cc
File src/kudu/client/client.cc:
PS1, Line 1145: CHECK(resp.has_table_id());
> We could, but the version of Kudu that doesn't return a table ID in AlterTa
SGTM
--
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 <ad...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes
[kudu-CR] c++ client: try harder to pass table IDs into RPCs that can accept them
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin 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:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/8066/2/src/kudu/client/client-internal.h
File src/kudu/client/client-internal.h:
PS2, Line 116: table_identifier
> maybe 'table_ref' to make it less confusing? ie a 'reference' is either an
Nit: another option might be introducing a special type TableIdentifier, which would have methods HasUuid(), uuid(), HasName(), name(). The TableIdentificationMode would be needed only for constructor or it's possible to drop it at all , adding SetName() and SetUuid() methods.
--
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 <ad...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes