[
https://issues.apache.org/jira/browse/HIVE-26293?focusedWorklogId=779805&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-779805
]
ASF GitHub Bot logged work on HIVE-26293:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 09/Jun/22 08:28
Start Date: 09/Jun/22 08:28
Worklog Time Spent: 10m
Work Description: deniskuzZ commented on code in PR #3103:
URL: https://github.com/apache/hive/pull/3103#discussion_r893220367
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/AcidEventListener.java:
##########
@@ -80,22 +82,18 @@ public void onDropTable(DropTableEvent tableEvent) throws
MetaException {
txnHandler.cleanupRecords(HiveObjectType.TABLE, null, table, null,
!tableEvent.getDeleteData());
if (!tableEvent.getDeleteData()) {
- long currentTxn =
Optional.ofNullable(tableEvent.getEnvironmentContext())
- .map(EnvironmentContext::getProperties)
- .map(prop -> prop.get("txnId"))
- .map(Long::parseLong)
- .orElse(0L);
+ long currentTxn = getTxnId(tableEvent.getEnvironmentContext());
- try {
- if (currentTxn > 0) {
+ if (currentTxn > 0) {
Review Comment:
just a small refactor, moved if out of try block
Issue Time Tracking
-------------------
Worklog Id: (was: 779805)
Time Spent: 1h 10m (was: 1h)
> Migrate remaining exclusive DDL operations to EXCL_WRITE lock & bug fixes
> -------------------------------------------------------------------------
>
> Key: HIVE-26293
> URL: https://issues.apache.org/jira/browse/HIVE-26293
> 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)