[ 
https://issues.apache.org/jira/browse/HIVE-23391?focusedWorklogId=765408&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-765408
 ]

ASF GitHub Bot logged work on HIVE-23391:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 03/May/22 12:35
            Start Date: 03/May/22 12:35
    Worklog Time Spent: 10m 
      Work Description: asinkovits commented on code in PR #3083:
URL: https://github.com/apache/hive/pull/3083#discussion_r863725509


##########
ql/src/test/org/apache/hadoop/hive/ql/lockmgr/TestDbTxnManager2.java:
##########
@@ -3592,4 +3592,84 @@ public void testDropTableNonBlocking2() throws Exception 
{
     driver.getFetchTask().fetch(res);
     Assert.assertEquals("No records found", 2, res.size());
   }
+
+  @Test
+  public void testAddColumnsNonBlocking() throws Exception {
+    testAddColumns(false);
+  }
+  @Test
+  public void testAddColumnsBlocking() throws Exception {
+    testAddColumns(true);
+  }
+
+  private void testAddColumns(boolean blocking) throws Exception {
+    dropTable(new String[] {"tab_acid", "tab_acid_v2"});
+

Review Comment:
   I don't see tab_acid_v2 being used anywhere.





Issue Time Tracking
-------------------

    Worklog Id:     (was: 765408)
    Time Spent: 50m  (was: 40m)

> Change requested lock for ALTER TABLE ADD COLUMN to DDL_SHARED
> --------------------------------------------------------------
>
>                 Key: HIVE-23391
>                 URL: https://issues.apache.org/jira/browse/HIVE-23391
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Zoltan Chovan
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 4.0.0
>
>         Attachments: HIVE-23391.2.patch, HIVE-23391.3.patch, 
> HIVE-23391.4.patch, HIVE-23391.patch
>
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> A long running query can block a simple add column query, as the add column 
> will require a DDL_EXCLUSIVE lock currently. By changing this to a shared 
> lock, this metadata only query can be executed without having to wait for the 
> previous query to finish.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to