[
https://issues.apache.org/jira/browse/HIVE-24445?focusedWorklogId=699335&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-699335
]
ASF GitHub Bot logged work on HIVE-24445:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 21/Dec/21 12:43
Start Date: 21/Dec/21 12:43
Worklog Time Spent: 10m
Work Description: pvary commented on a change in pull request #2772:
URL: https://github.com/apache/hive/pull/2772#discussion_r773104253
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
##########
@@ -1334,6 +1344,20 @@ public void dropTable(String tableName, boolean ifPurge)
throws HiveException {
dropTable(names[0], names[1], true, true, ifPurge);
}
+ public void dropTable(Table table, boolean ifPurge) throws HiveException {
+ boolean tableWithSuffix = (HiveConf.getBoolVar(conf,
ConfVars.HIVE_ACID_CREATE_TABLE_USE_SUFFIX)
+ || HiveConf.getBoolVar(conf,
ConfVars.HIVE_ACID_LOCKLESS_READS_ENABLED))
+ && AcidUtils.isTransactionalTable(table)
+ && table.getSd().getLocation().matches(PATH_WITH_VERSION_ID);
+
+ if (tableWithSuffix) {
+ long txnId = Optional.ofNullable(SessionState.get())
+ .map(ss -> ss.getTxnMgr().getCurrentTxnId()).orElse(0L);
+ table.getTTable().setTxnId(txnId);
+ }
Review comment:
Like above - we can always set the txnId, and use the flag to decide how
to drop (soft/hard)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 699335)
Time Spent: 13h (was: 12h 50m)
> Non blocking DROP TABLE implementation
> --------------------------------------
>
> Key: HIVE-24445
> URL: https://issues.apache.org/jira/browse/HIVE-24445
> Project: Hive
> Issue Type: New Feature
> Components: Hive
> Reporter: Zoltan Chovan
> Assignee: Denys Kuzmenko
> Priority: Major
> Labels: pull-request-available
> Time Spent: 13h
> Remaining Estimate: 0h
>
> Implement a way to execute drop table operations in a way that doesn't have
> to wait for currently running read operations to be finished.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)