Hello Andrew Wong,

I'd like you to do a code review. Please visit

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

to review the following change.


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/transactions/transaction.h
1 file changed, 9 insertions(+), 8 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/91/15791/1
--
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: newchange
Gerrit-Change-Id: I2c6bc8b85a066426bcf4bc2d1c058bc75c1c38ec
Gerrit-Change-Number: 15791
Gerrit-PatchSet: 1
Gerrit-Owner: Todd Lipcon <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>

Reply via email to