You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Alexey Serbin (Code Review)" <ge...@cloudera.org> on 2021/02/09 20:51:45 UTC

[kudu-CR] [transactions] add TxnSystemClient::CheckOpenTxnSystemTable()

Alexey Serbin has uploaded this change for review. ( http://gerrit.cloudera.org:8080/17044


Change subject: [transactions] add TxnSystemClient::CheckOpenTxnSystemTable()
......................................................................

[transactions] add TxnSystemClient::CheckOpenTxnSystemTable()

This patch adds a new ClientCheckOpenTxnSystemTable() method to
TxnSystemClient.  The new method is targeting the use case in a
follow-up patch where txn system client is used to automatically
register transaction participants while serving write requests
arriving to tablet servers.

NOTE: as of now, it would be necessary to re-open the transaction
      system table when a new partition added (i.e. when txn IDs
      grow) to make sense of using this approach with the newly
      introduced ClientCheckOpenTxnSystemTable() method.
      I'm planning to address that in a follow-up patch.

Change-Id: If2e9b3cfc1566ff8ddbe56be980fb7d360759c0f
---
M src/kudu/integration-tests/txn_status_table-itest.cc
M src/kudu/transactions/txn_system_client.cc
M src/kudu/transactions/txn_system_client.h
3 files changed, 121 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/44/17044/4
-- 
To view, visit http://gerrit.cloudera.org:8080/17044
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: If2e9b3cfc1566ff8ddbe56be980fb7d360759c0f
Gerrit-Change-Number: 17044
Gerrit-PatchSet: 4
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>

[kudu-CR] [transactions] add TxnSystemClient::CheckOpenTxnSystemTable()

Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Andrew Wong has posted comments on this change. ( http://gerrit.cloudera.org:8080/17044 )

Change subject: [transactions] add TxnSystemClient::CheckOpenTxnSystemTable()
......................................................................


Patch Set 8: Code-Review+2


-- 
To view, visit http://gerrit.cloudera.org:8080/17044
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If2e9b3cfc1566ff8ddbe56be980fb7d360759c0f
Gerrit-Change-Number: 17044
Gerrit-PatchSet: 8
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Thu, 11 Feb 2021 01:08:56 +0000
Gerrit-HasComments: No

[kudu-CR] [transactions] add TxnSystemClient::CheckOpenTxnSystemTable()

Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Andrew Wong has posted comments on this change. ( http://gerrit.cloudera.org:8080/17044 )

Change subject: [transactions] add TxnSystemClient::CheckOpenTxnSystemTable()
......................................................................


Patch Set 4:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/17044/4/src/kudu/integration-tests/txn_status_table-itest.cc
File src/kudu/integration-tests/txn_status_table-itest.cc:

http://gerrit.cloudera.org:8080/#/c/17044/4/src/kudu/integration-tests/txn_status_table-itest.cc@682
PS4, Line 682: s 
nit: extra space


http://gerrit.cloudera.org:8080/#/c/17044/4/src/kudu/integration-tests/txn_status_table-itest.cc@696
PS4, Line 696: newTxnId
nit: snake_case?


http://gerrit.cloudera.org:8080/#/c/17044/4/src/kudu/integration-tests/txn_status_table-itest.cc@697
PS4, Line 697: {
             :     // Behind the scenes, create tablets for the next transaction IDs range
             :     // and start a new transaction.
             :     {
             :       shared_ptr<KuduClient> c;
             :       KuduClientBuilder builder;
             :       ASSERT_OK(cluster_->CreateClient(&builder, &c));
             :       txn_sys_client_->client_ = std::move(c);
             :     }
             :     // Re-open the system table.
             :     ASSERT_OK(txn_sys_client_->OpenTxnStatusTable());
             :     ASSERT_OK(txn_sys_client_->AddTxnStatusTableRange(
             :         kPartitionWidth, 2 * kPartitionWidth));
             :     ASSERT_OK(txn_sys_client_->BeginTransaction(newTxnId, kUser));
             :   }
             : 
nit: I'm curious, rather than doing this dance in swapping the client in, why not just instantiate a new TxnSystemClient to add the partition? Seems that'd be more organic in exercising this codepath since that is what happens (the TxnManager instantiates has its own client)



-- 
To view, visit http://gerrit.cloudera.org:8080/17044
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If2e9b3cfc1566ff8ddbe56be980fb7d360759c0f
Gerrit-Change-Number: 17044
Gerrit-PatchSet: 4
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Comment-Date: Wed, 10 Feb 2021 01:23:22 +0000
Gerrit-HasComments: Yes

[kudu-CR] [transactions] add TxnSystemClient::CheckOpenTxnSystemTable()

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/17044 )

Change subject: [transactions] add TxnSystemClient::CheckOpenTxnSystemTable()
......................................................................

[transactions] add TxnSystemClient::CheckOpenTxnSystemTable()

This patch adds a new ClientCheckOpenTxnSystemTable() method to
TxnSystemClient.  The new method is targeting the use case in a
follow-up patch where txn system client is used to automatically
register transaction participants while serving write requests
arriving to tablet servers.

NOTE: as of now, it would be necessary to re-open the transaction
      system table when a new partition added (i.e. when txn IDs
      grow) to make sense of using this approach with the newly
      introduced ClientCheckOpenTxnSystemTable() method.
      I'm planning to address that in a follow-up patch.

Change-Id: If2e9b3cfc1566ff8ddbe56be980fb7d360759c0f
Reviewed-on: http://gerrit.cloudera.org:8080/17044
Reviewed-by: Andrew Wong <aw...@cloudera.com>
Tested-by: Kudu Jenkins
---
M src/kudu/integration-tests/txn_status_table-itest.cc
M src/kudu/transactions/txn_system_client.cc
M src/kudu/transactions/txn_system_client.h
3 files changed, 118 insertions(+), 0 deletions(-)

Approvals:
  Andrew Wong: Looks good to me, approved
  Kudu Jenkins: Verified

-- 
To view, visit http://gerrit.cloudera.org:8080/17044
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: If2e9b3cfc1566ff8ddbe56be980fb7d360759c0f
Gerrit-Change-Number: 17044
Gerrit-PatchSet: 9
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)

[kudu-CR] [transactions] add TxnSystemClient::CheckOpenTxnSystemTable()

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/17044 )

Change subject: [transactions] add TxnSystemClient::CheckOpenTxnSystemTable()
......................................................................


Patch Set 4:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/17044/4/src/kudu/integration-tests/txn_status_table-itest.cc
File src/kudu/integration-tests/txn_status_table-itest.cc:

http://gerrit.cloudera.org:8080/#/c/17044/4/src/kudu/integration-tests/txn_status_table-itest.cc@682
PS4, Line 682: s 
> nit: extra space
Done


http://gerrit.cloudera.org:8080/#/c/17044/4/src/kudu/integration-tests/txn_status_table-itest.cc@696
PS4, Line 696: newTxnId
> nit: snake_case?
changed to constexpr, so it's now kNewTxnId


http://gerrit.cloudera.org:8080/#/c/17044/4/src/kudu/integration-tests/txn_status_table-itest.cc@697
PS4, Line 697: {
             :     // Behind the scenes, create tablets for the next transaction IDs range
             :     // and start a new transaction.
             :     {
             :       shared_ptr<KuduClient> c;
             :       KuduClientBuilder builder;
             :       ASSERT_OK(cluster_->CreateClient(&builder, &c));
             :       txn_sys_client_->client_ = std::move(c);
             :     }
             :     // Re-open the system table.
             :     ASSERT_OK(txn_sys_client_->OpenTxnStatusTable());
             :     ASSERT_OK(txn_sys_client_->AddTxnStatusTableRange(
             :         kPartitionWidth, 2 * kPartitionWidth));
             :     ASSERT_OK(txn_sys_client_->BeginTransaction(newTxnId, kUser));
             :   }
             : 
> nit: I'm curious, rather than doing this dance in swapping the client in, w
indeed



-- 
To view, visit http://gerrit.cloudera.org:8080/17044
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If2e9b3cfc1566ff8ddbe56be980fb7d360759c0f
Gerrit-Change-Number: 17044
Gerrit-PatchSet: 4
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Wed, 10 Feb 2021 05:32:46 +0000
Gerrit-HasComments: Yes

[kudu-CR] [transactions] add TxnSystemClient::CheckOpenTxnSystemTable()

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Hello Andrew Wong, Hao Hao, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/17044

to look at the new patch set (#5).

Change subject: [transactions] add TxnSystemClient::CheckOpenTxnSystemTable()
......................................................................

[transactions] add TxnSystemClient::CheckOpenTxnSystemTable()

This patch adds a new ClientCheckOpenTxnSystemTable() method to
TxnSystemClient.  The new method is targeting the use case in a
follow-up patch where txn system client is used to automatically
register transaction participants while serving write requests
arriving to tablet servers.

NOTE: as of now, it would be necessary to re-open the transaction
      system table when a new partition added (i.e. when txn IDs
      grow) to make sense of using this approach with the newly
      introduced ClientCheckOpenTxnSystemTable() method.
      I'm planning to address that in a follow-up patch.

Change-Id: If2e9b3cfc1566ff8ddbe56be980fb7d360759c0f
---
M src/kudu/integration-tests/txn_status_table-itest.cc
M src/kudu/transactions/txn_system_client.cc
M src/kudu/transactions/txn_system_client.h
3 files changed, 105 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/44/17044/5
-- 
To view, visit http://gerrit.cloudera.org:8080/17044
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: If2e9b3cfc1566ff8ddbe56be980fb7d360759c0f
Gerrit-Change-Number: 17044
Gerrit-PatchSet: 5
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>

[kudu-CR] [transactions] add TxnSystemClient::CheckOpenTxnSystemTable()

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Kudu Jenkins, Andrew Wong, Hao Hao, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/17044

to look at the new patch set (#6).

Change subject: [transactions] add TxnSystemClient::CheckOpenTxnSystemTable()
......................................................................

[transactions] add TxnSystemClient::CheckOpenTxnSystemTable()

This patch adds a new ClientCheckOpenTxnSystemTable() method to
TxnSystemClient.  The new method is targeting the use case in a
follow-up patch where txn system client is used to automatically
register transaction participants while serving write requests
arriving to tablet servers.

NOTE: as of now, it would be necessary to re-open the transaction
      system table when a new partition added (i.e. when txn IDs
      grow) to make sense of using this approach with the newly
      introduced ClientCheckOpenTxnSystemTable() method.
      I'm planning to address that in a follow-up patch.

Change-Id: If2e9b3cfc1566ff8ddbe56be980fb7d360759c0f
---
M src/kudu/integration-tests/txn_status_table-itest.cc
M src/kudu/transactions/txn_system_client.cc
M src/kudu/transactions/txn_system_client.h
3 files changed, 105 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/44/17044/6
-- 
To view, visit http://gerrit.cloudera.org:8080/17044
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: If2e9b3cfc1566ff8ddbe56be980fb7d360759c0f
Gerrit-Change-Number: 17044
Gerrit-PatchSet: 6
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)

[kudu-CR] [transactions] add TxnSystemClient::CheckOpenTxnSystemTable()

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Kudu Jenkins, Andrew Wong, Hao Hao, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/17044

to look at the new patch set (#8).

Change subject: [transactions] add TxnSystemClient::CheckOpenTxnSystemTable()
......................................................................

[transactions] add TxnSystemClient::CheckOpenTxnSystemTable()

This patch adds a new ClientCheckOpenTxnSystemTable() method to
TxnSystemClient.  The new method is targeting the use case in a
follow-up patch where txn system client is used to automatically
register transaction participants while serving write requests
arriving to tablet servers.

NOTE: as of now, it would be necessary to re-open the transaction
      system table when a new partition added (i.e. when txn IDs
      grow) to make sense of using this approach with the newly
      introduced ClientCheckOpenTxnSystemTable() method.
      I'm planning to address that in a follow-up patch.

Change-Id: If2e9b3cfc1566ff8ddbe56be980fb7d360759c0f
---
M src/kudu/integration-tests/txn_status_table-itest.cc
M src/kudu/transactions/txn_system_client.cc
M src/kudu/transactions/txn_system_client.h
3 files changed, 118 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/44/17044/8
-- 
To view, visit http://gerrit.cloudera.org:8080/17044
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: If2e9b3cfc1566ff8ddbe56be980fb7d360759c0f
Gerrit-Change-Number: 17044
Gerrit-PatchSet: 8
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)

[kudu-CR] [transactions] add TxnSystemClient::CheckOpenTxnSystemTable()

Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Andrew Wong has posted comments on this change. ( http://gerrit.cloudera.org:8080/17044 )

Change subject: [transactions] add TxnSystemClient::CheckOpenTxnSystemTable()
......................................................................


Patch Set 7: Code-Review+2


-- 
To view, visit http://gerrit.cloudera.org:8080/17044
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If2e9b3cfc1566ff8ddbe56be980fb7d360759c0f
Gerrit-Change-Number: 17044
Gerrit-PatchSet: 7
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Wed, 10 Feb 2021 23:36:09 +0000
Gerrit-HasComments: No

[kudu-CR] [transactions] add TxnSystemClient::CheckOpenTxnSystemTable()

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Kudu Jenkins, Andrew Wong, Hao Hao, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/17044

to look at the new patch set (#7).

Change subject: [transactions] add TxnSystemClient::CheckOpenTxnSystemTable()
......................................................................

[transactions] add TxnSystemClient::CheckOpenTxnSystemTable()

This patch adds a new ClientCheckOpenTxnSystemTable() method to
TxnSystemClient.  The new method is targeting the use case in a
follow-up patch where txn system client is used to automatically
register transaction participants while serving write requests
arriving to tablet servers.

NOTE: as of now, it would be necessary to re-open the transaction
      system table when a new partition added (i.e. when txn IDs
      grow) to make sense of using this approach with the newly
      introduced ClientCheckOpenTxnSystemTable() method.
      I'm planning to address that in a follow-up patch.

Change-Id: If2e9b3cfc1566ff8ddbe56be980fb7d360759c0f
---
M src/kudu/integration-tests/txn_status_table-itest.cc
M src/kudu/transactions/txn_system_client.cc
M src/kudu/transactions/txn_system_client.h
3 files changed, 116 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/44/17044/7
-- 
To view, visit http://gerrit.cloudera.org:8080/17044
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: If2e9b3cfc1566ff8ddbe56be980fb7d360759c0f
Gerrit-Change-Number: 17044
Gerrit-PatchSet: 7
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)