You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Hao Hao (Code Review)" <ge...@cloudera.org> on 2021/03/11 07:21:20 UTC

[kudu-CR] KUDU-2612: add PartitionLock and ScopedPartitionLock

Hello Tidy Bot, Alexey Serbin, Kudu Jenkins, Andrew Wong, Bankim Bhavsar, 

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

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

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

Change subject: KUDU-2612: add PartitionLock and ScopedPartitionLock
......................................................................

KUDU-2612: add PartitionLock and ScopedPartitionLock

This patch introduces a coarse grained partition level lock, PartitionLock
to prevent dirty writes for multi-rows transaction. A partition lock can
only be held by a single transaction (or write op) at a time, the same
transaction can acquire the lock for multiple times. To prevent deadlock,
'wait-die' scheme is used, which if the transaction requires a lock held by
another transaction,
  1) abort the transaction immediately if it has a higher txn ID than
     the other one.
  2) Otherwise, retry the write op (or participant op) of the transaction.

A ScopedPartitionLock is also introduced to automatically manage the
lifecycle of a PartitionLock.

Change-Id: I158115739ce3e7cfb77bbcb854e834336c1256b1
---
M src/kudu/tablet/lock_manager-test.cc
M src/kudu/tablet/lock_manager.cc
M src/kudu/tablet/lock_manager.h
M src/kudu/tserver/tserver.proto
4 files changed, 396 insertions(+), 13 deletions(-)


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

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