-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72387/
-----------------------------------------------------------
(Updated April 21, 2020, 12:14 p.m.)
Review request for hive, Marton Bod and Peter Vary.
Changes
-------
added quotes
Bugs: HIVE-19369
https://issues.apache.org/jira/browse/HIVE-19369
Repository: hive-git
Description
-------
Hive Locking with Micro-managed and full-ACID tables needs a better locking
implementation which allows for no-wait readers always.
EXCL_DROP
EXCL_WRITE
SHARED_WRITE
SHARED_READ
Short write-up
EXCL_DROP is a "drop partition" or "drop table" and waits for all others to exit
EXCL_WRITE excludes all writes and will wait for all existing SHARED_WRITE to
exit.
SHARED_WRITE allows all SHARED_WRITES to go through, but will wait for an
EXCL_WRITE & EXCL_DROP (waiting so that you can do drop + insert in different
threads).
SHARED_READ does not wait for any lock - it fails fast for a pending EXCL_DROP,
because even if there is an EXCL_WRITE or SHARED_WRITE pending, there's no
semantic reason to wait for them to succeed before going ahead with a
SHARED_WRITE.
a select * => SHARED_READ
an insert into => SHARED_WRITE
an insert overwrite or MERGE => EXCL_WRITE
a drop table => EXCL_DROP
Diffs (updated)
-----
common/src/java/org/apache/hadoop/hive/conf/HiveConf.java 16bae920df
ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java 77878ca40b
ql/src/test/org/apache/hadoop/hive/metastore/txn/TestTxnHandler.java
1d211857bf
ql/src/test/org/apache/hadoop/hive/ql/lockmgr/TestDbTxnManager2.java
73d3b91585
ql/src/test/queries/clientpositive/explain_locks.q 3c11560c5f
ql/src/test/results/clientpositive/llap/explain_locks.q.out 3183533478
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/LockRequestBuilder.java
22902a9c20
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/LockTypeComparator.java
PRE-CREATION
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java
d080df417b
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/utils/LockTypeUtil.java
f928bf781b
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/utils/LockTypeUtilTest.java
3d69a6e7dc
Diff: https://reviews.apache.org/r/72387/diff/4/
Changes: https://reviews.apache.org/r/72387/diff/3-4/
Testing
-------
Added number of tests under TestDbTxnManager2, TestTxnHandler & extended
explain_locks.q test.
Thanks,
Denys Kuzmenko