[
https://issues.apache.org/jira/browse/HIVE-26252?focusedWorklogId=773387&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-773387
]
ASF GitHub Bot logged work on HIVE-26252:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 23/May/22 09:35
Start Date: 23/May/22 09:35
Worklog Time Spent: 10m
Work Description: deniskuzZ commented on code in PR #3308:
URL: https://github.com/apache/hive/pull/3308#discussion_r879223033
##########
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/LockRequestBuilder.java:
##########
@@ -168,8 +169,9 @@ private void setPart(LockComponent comp, PartTrie parts) {
if (existing == null) {
// No existing lock for this partition.
parts.put(comp.getPartitionname(), comp);
- } else if (lockTypeComparator.compare(comp.getType(),
existing.getType()) > 0) {
- // We only need to promote if comp.type is > existing.type.
+ } else if (lockTypeComparator.compare(comp.getType(),
existing.getType()) > 0
+ || comp.getType() == existing.getType() &&
existing.getOperationType() == DataOperationType.INSERT) {
Review Comment:
if there is an insert (existing.opType=INSERT), we will overwrite it with
what comes next (parts is a Map<String, LockComponent>). A comment was updated
to:
````
// We only need to promote if comp.type is > existing.type or it's an
update/delete
````
Issue Time Tracking
-------------------
Worklog Id: (was: 773387)
Time Spent: 1h 10m (was: 1h)
> Missing locks in case of MERGE with multiple branches
> -----------------------------------------------------
>
> Key: HIVE-26252
> URL: https://issues.apache.org/jira/browse/HIVE-26252
> Project: Hive
> Issue Type: Task
> Reporter: Denys Kuzmenko
> Priority: Major
> Labels: pull-request-available
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.20.7#820007)