dengzhhu653 commented on code in PR #6450:
URL: https://github.com/apache/hive/pull/6450#discussion_r3331516385


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java:
##########
@@ -639,6 +639,18 @@ public Partition alterPartition(RawStore msdb, Warehouse 
wh, String catName, Str
     FileSystem destFs = null;
     boolean dataWasMoved = false;
     Database db;
+    Partition check_part;

Review Comment:
   If the partition is absent, `msdb.getPartition` throws the expected 
NoSuchObjectException, before this fix we just ignore the exception under the 
active transaction and continue the rest of the transaction, this is not good 
from the perspective of transaction.
   Now every call in msdb(TableStore) starts an active transaction at the 
beginning(TransactionHandler), if we don't move this part outside of the 
transaction, it would cause an imbalance of `ObjectStore#openTrasactionCalls`



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to