You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Todd Lipcon (Code Review)" <ge...@cloudera.org> on 2020/05/27 16:52:52 UTC

[kudu-CR] transaction: avoid locking for TransactionState::timestamp

Hello Alexey Serbin, Andrew Wong, Kudu Jenkins, Hao Hao, Volodymyr Verovkin, 

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

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

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

Change subject: transaction: avoid locking for TransactionState::timestamp_
......................................................................

transaction: avoid locking for TransactionState::timestamp_

This field is already synchronized externally for mutations by the transaction
lifecycle (we never have a case where multiple threads are trying to
concurrently assign a timestamp to a transaction). The timestamp might
be concurrently read (eg by ToString() for the /transactions web page)
but an atomic variable is sufficient for this use case.

I saw a couple percent of the Apply thread's CPU going to managing this
locking, which should go away with this change.

Change-Id: I2c6bc8b85a066426bcf4bc2d1c058bc75c1c38ec
---
M src/kudu/tablet/ops/op.h
1 file changed, 9 insertions(+), 8 deletions(-)


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I2c6bc8b85a066426bcf4bc2d1c058bc75c1c38ec
Gerrit-Change-Number: 15791
Gerrit-PatchSet: 2
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <an...@cloudera.com>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Volodymyr Verovkin <ve...@cloudera.com>