[
https://issues.apache.org/jira/browse/HIVE-26244?focusedWorklogId=782870&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-782870
]
ASF GitHub Bot logged work on HIVE-26244:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 20/Jun/22 08:33
Start Date: 20/Jun/22 08:33
Worklog Time Spent: 10m
Work Description: deniskuzZ commented on code in PR #3307:
URL: https://github.com/apache/hive/pull/3307#discussion_r901397117
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java:
##########
@@ -5280,23 +5291,24 @@ is performed on that db (e.g. show tables, created
table, etc).
LOG.debug("Failure to acquire lock({} intLockId:{} {}), blocked by
({})", JavaUtils.lockIdToString(extLockId),
intLockId, JavaUtils.txnIdToString(txnId), blockedBy);
- if (zeroWaitReadEnabled && isValidTxn(txnId)) {
+ if ((zeroWaitReadEnabled || isExclusiveCTAS) && isValidTxn(txnId)) {
LockType lockType = LockTypeUtil.getLockTypeFromEncoding(lockChar)
- .orElseThrow(() -> new MetaException("Unknown lock type: " +
lockChar));
-
- if (lockType == LockType.SHARED_READ) {
- String cleanupQuery = "DELETE FROM \"HIVE_LOCKS\" WHERE
\"HL_LOCK_EXT_ID\" = " + extLockId;
+ .orElseThrow(() -> new MetaException("Unknown lock type: " +
lockChar));
- LOG.debug("Going to execute query: <" + cleanupQuery + ">");
- stmt.executeUpdate(cleanupQuery);
+ if (lockType == LockType.SHARED_READ || isExclusiveCTAS) {
+ if (!isExclusiveCTAS) {
Review Comment:
delete from HIVE_LOCKS should be done for isExclusiveCTAS as well
Issue Time Tracking
-------------------
Worklog Id: (was: 782870)
Time Spent: 7h 50m (was: 7h 40m)
> Implementing locking for concurrent ctas
> ----------------------------------------
>
> Key: HIVE-26244
> URL: https://issues.apache.org/jira/browse/HIVE-26244
> Project: Hive
> Issue Type: Improvement
> Reporter: Simhadri G
> Assignee: Simhadri G
> Priority: Major
> Labels: pull-request-available
> Time Spent: 7h 50m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.20.7#820007)