[ https://issues.apache.org/jira/browse/HIVE-26922?focusedWorklogId=839978&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-839978 ]
ASF GitHub Bot logged work on HIVE-26922: ----------------------------------------- Author: ASF GitHub Bot Created on: 18/Jan/23 14:11 Start Date: 18/Jan/23 14:11 Worklog Time Spent: 10m Work Description: kasakrisz commented on code in PR #3934: URL: https://github.com/apache/hive/pull/3934#discussion_r1073584822 ########## ql/src/test/org/apache/hadoop/hive/ql/metadata/StorageHandlerMock.java: ########## @@ -70,7 +70,7 @@ public class StorageHandlerMock extends DefaultStorageHandler { if (writeEntity.getWriteType().equals(WriteEntity.WriteType.INSERT)) { return LockType.SHARED_READ; } - return LockType.SHARED_WRITE; + return LockType.EXCLUSIVE; Review Comment: This mock is used in 2 test cases: * testLockingOnInsertIntoNonNativeTables * testLockingOnInsertOverwriteNonNativeTables Prior this patch this was ignored in case of insert overwrite and `EXCLUSIVE` was set in case of any type of non transactional table. After I altered the logic to use the lock type coming from the `storageHandler` the mock returned `SHARED_WRITE` and test `testLockingOnInsertOverwriteNonNativeTables` failed since it still expected `EXCLUSIVE`. I could alter the assertion in the test but since the default lock type specified by the storage handler is `EXCLUSIVE` I chose altering the mock. https://github.com/apache/hive/blob/55471330426c2e0a52101c2e535a66f751be76ee/ql/src/java/org/apache/hadoop/hive/ql/metadata/HiveStorageHandler.java#L199-L201 Maybe `super.getLockType` would be better here. Issue Time Tracking ------------------- Worklog Id: (was: 839978) Time Spent: 2h 10m (was: 2h) > Deadlock when rebuilding Materialized view stored by Iceberg > ------------------------------------------------------------ > > Key: HIVE-26922 > URL: https://issues.apache.org/jira/browse/HIVE-26922 > Project: Hive > Issue Type: Bug > Reporter: Krisztian Kasa > Assignee: Krisztian Kasa > Priority: Major > Labels: pull-request-available > Time Spent: 2h 10m > Remaining Estimate: 0h > > {code} > create table tbl_ice(a int, b string, c int) stored by iceberg stored as orc > tblproperties ('format-version'='1'); > insert into tbl_ice values (1, 'one', 50), (2, 'two', 51), (3, 'three', 52), > (4, 'four', 53), (5, 'five', 54); > create materialized view mat1 stored by iceberg stored as orc tblproperties > ('format-version'='1') as > select tbl_ice.b, tbl_ice.c from tbl_ice where tbl_ice.c > 52; > insert into tbl_ice values (10, 'ten', 60); > alter materialized view mat1 rebuild; > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)