apache /
kudu /
2d0631fe289968094c9dc6a7b16fcc6df9a269ba 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 <awong@cloudera.com>
11 files changed