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 2020/11/17 07:59:02 UTC

[kudu-CR] KUDU-2612 move keep-alive assignment to TxnStatusManager

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


Change subject: KUDU-2612 move keep-alive assignment to TxnStatusManager
......................................................................

KUDU-2612 move keep-alive assignment to TxnStatusManager

To prepare for the processing of transactions' keep-alive heartbeats and
tracking of stale/abandoned transactions in follow-up patches, the
assignment of the keep-alive setting for a newly started transaction
has moved from TxnManager to TxnStatusManager.

The rationale for this change is the fact that TxnStatusManager will
have a periodic task to track the staleness of open transactions
registered with it, and at this point we anticipate the keep-alive
setting for transactions to be a system-wide parameter, not
a per-transaction one.  With that, it's natural to make TxnStatusManager
the single source of truth for the transaction keep-alive interval
setting, such that the latter to be used to assign the corresponding
property for newly created transactions and to spot stale/abandoned
transactions.

Of course, an alternative might be keeping TxnManager as the source of
truth for the keep-alive setting, but that would entail persistently
storing the values assigned by TxnManager in a per-transaction basis,
which is hard to justify without a particular use case.

This patch also brings in a few extra tests and updates the relevant
existing ones.

Change-Id: Ie98688b2bbe4c673abbfc5801f89eb8182003c18
---
M src/kudu/integration-tests/txn_status_table-itest.cc
M src/kudu/master/txn_manager-test.cc
M src/kudu/master/txn_manager.cc
M src/kudu/master/txn_manager.h
M src/kudu/master/txn_manager.proto
M src/kudu/master/txn_manager_service.cc
M src/kudu/transactions/txn_status_manager.cc
M src/kudu/transactions/txn_system_client.cc
M src/kudu/transactions/txn_system_client.h
M src/kudu/tserver/tablet_service.cc
M src/kudu/tserver/tserver_admin.proto
11 files changed, 78 insertions(+), 29 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/37/16737/1
-- 
To view, visit http://gerrit.cloudera.org:8080/16737
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie98688b2bbe4c673abbfc5801f89eb8182003c18
Gerrit-Change-Number: 16737
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>

[kudu-CR] KUDU-2612 move keep-alive assignment to TxnStatusManager

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

Change subject: KUDU-2612 move keep-alive assignment to TxnStatusManager
......................................................................

KUDU-2612 move keep-alive assignment to TxnStatusManager

To prepare for the processing of transactions' keep-alive heartbeats
and tracking of stale/abandoned transactions, the assignment of the
keep-alive setting for a newly started transaction has moved from
TxnManager to TxnStatusManager.

The rationale for this change is the fact that TxnStatusManager will
have a periodic task to track the staleness of open transactions
registered with it.  At this point we anticipate the keep-alive setting
to be a system-wide parameter, not a per-transaction one.  With that,
it's natural to make TxnStatusManager the single source of truth for
the transaction keep-alive interval, such that the latter to be used
to assign the corresponding property for newly created transactions
and to spot stale/abandoned ones.

An alternative would be keeping TxnManager as the source of truth
for the transaction keep-alive setting, but that would entail storing
persistently the value assigned by TxnManager in a per-transaction
basis, which is hard to justify without a particular use case.

This patch also brings in a few test scenarios and updates the relevant
existing ones.

Change-Id: Ie98688b2bbe4c673abbfc5801f89eb8182003c18
Reviewed-on: http://gerrit.cloudera.org:8080/16737
Tested-by: Kudu Jenkins
Reviewed-by: Andrew Wong <aw...@cloudera.com>
---
M src/kudu/integration-tests/txn_status_table-itest.cc
M src/kudu/master/txn_manager-test.cc
M src/kudu/master/txn_manager.cc
M src/kudu/master/txn_manager.h
M src/kudu/master/txn_manager.proto
M src/kudu/master/txn_manager_service.cc
M src/kudu/transactions/txn_status_manager.cc
M src/kudu/transactions/txn_system_client.cc
M src/kudu/transactions/txn_system_client.h
M src/kudu/tserver/tablet_service.cc
M src/kudu/tserver/tserver_admin.proto
11 files changed, 78 insertions(+), 29 deletions(-)

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

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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie98688b2bbe4c673abbfc5801f89eb8182003c18
Gerrit-Change-Number: 16737
Gerrit-PatchSet: 3
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)

[kudu-CR] KUDU-2612 move keep-alive assignment to TxnStatusManager

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

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

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

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

Change subject: KUDU-2612 move keep-alive assignment to TxnStatusManager
......................................................................

KUDU-2612 move keep-alive assignment to TxnStatusManager

To prepare for the processing of transactions' keep-alive heartbeats
and tracking of stale/abandoned transactions, the assignment of the
keep-alive setting for a newly started transaction has moved from
TxnManager to TxnStatusManager.

The rationale for this change is the fact that TxnStatusManager will
have a periodic task to track the staleness of open transactions
registered with it.  At this point we anticipate the keep-alive setting
to be a system-wide parameter, not a per-transaction one.  With that,
it's natural to make TxnStatusManager the single source of truth for
the transaction keep-alive interval, such that the latter to be used
to assign the corresponding property for newly created transactions
and to spot stale/abandoned ones.

An alternative would be keeping TxnManager as the source of truth
for the transaction keep-alive setting, but that would entail storing
persistently the value assigned by TxnManager in a per-transaction
basis, which is hard to justify without a particular use case.

This patch also brings in a few test scenarios and updates the relevant
existing ones.

Change-Id: Ie98688b2bbe4c673abbfc5801f89eb8182003c18
---
M src/kudu/integration-tests/txn_status_table-itest.cc
M src/kudu/master/txn_manager-test.cc
M src/kudu/master/txn_manager.cc
M src/kudu/master/txn_manager.h
M src/kudu/master/txn_manager.proto
M src/kudu/master/txn_manager_service.cc
M src/kudu/transactions/txn_status_manager.cc
M src/kudu/transactions/txn_system_client.cc
M src/kudu/transactions/txn_system_client.h
M src/kudu/tserver/tablet_service.cc
M src/kudu/tserver/tserver_admin.proto
11 files changed, 78 insertions(+), 29 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/37/16737/2
-- 
To view, visit http://gerrit.cloudera.org:8080/16737
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ie98688b2bbe4c673abbfc5801f89eb8182003c18
Gerrit-Change-Number: 16737
Gerrit-PatchSet: 2
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)

[kudu-CR] KUDU-2612 move keep-alive assignment to TxnStatusManager

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

Change subject: KUDU-2612 move keep-alive assignment to TxnStatusManager
......................................................................


Patch Set 2: Code-Review+2


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie98688b2bbe4c673abbfc5801f89eb8182003c18
Gerrit-Change-Number: 16737
Gerrit-PatchSet: 2
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-Comment-Date: Tue, 17 Nov 2020 20:38:54 +0000
Gerrit-HasComments: No