[
https://issues.apache.org/jira/browse/HIVE-26076?focusedWorklogId=765499&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-765499
]
ASF GitHub Bot logged work on HIVE-26076:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 03/May/22 15:19
Start Date: 03/May/22 15:19
Worklog Time Spent: 10m
Work Description: deniskuzZ commented on code in PR #3122:
URL: https://github.com/apache/hive/pull/3122#discussion_r863895000
##########
ql/src/test/org/apache/hadoop/hive/ql/lockmgr/TestDbTxnManager2.java:
##########
@@ -4028,4 +4005,88 @@ public void testAddDropConstraintNonBlocking() throws
Exception {
checkLock(LockType.EXCL_WRITE,
LockState.ACQUIRED, "default", "tab_acid", null, locks);
}
+
+ @Test
+ public void testAddPartitionIfNotExistsNonBlocking() throws Exception {
+ testAddPartitionIfNotExists(false);
+ }
+ @Test
+ public void testAddPartitionIfNotExistsBlocking() throws Exception {
+ testAddPartitionIfNotExists(true);
+ }
+
+ private void testAddPartitionIfNotExists(boolean blocking) throws Exception {
+ dropTable(new String[] {"T", "Tstage"});
+
+ HiveConf.setIntVar(conf, HiveConf.ConfVars.HIVE_LOCKS_PARTITION_THRESHOLD,
1);
+ driver = Mockito.spy(driver);
+
+ HiveConf.setBoolVar(driver2.getConf(),
HiveConf.ConfVars.HIVE_ACID_LOCKLESS_READS_ENABLED, !blocking);
Review Comment:
yep, removed it
Issue Time Tracking
-------------------
Worklog Id: (was: 765499)
Time Spent: 50m (was: 40m)
> Non blocking ADD PARTITION if not exists
> ----------------------------------------
>
> Key: HIVE-26076
> URL: https://issues.apache.org/jira/browse/HIVE-26076
> Project: Hive
> Issue Type: Task
> Reporter: Denys Kuzmenko
> Priority: Major
> Labels: pull-request-available
> Time Spent: 50m
> Remaining Estimate: 0h
>
> Originally X (EXCLUSIVE) lock was used to prevent races between concurrent
> add partition calls with IF NOT EXISTS, however, the same behavior could be
> achieved with a less restrictive X-write (EXCL_WRITE) lock.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)