deniskuzZ commented on a change in pull request #1724:
URL: https://github.com/apache/hive/pull/1724#discussion_r553324429



##########
File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
##########
@@ -4355,17 +4376,20 @@ private int add_partitions_pspec_core(RawStore ms, 
String catName, String dbName
         success = ms.commitTransaction();
         return addedPartitions.size();
       } finally {
-        if (!success) {
-          ms.rollbackTransaction();
-          cleanupPartitionFolders(addedPartitions, db);
-        }
-
-        if (!listeners.isEmpty()) {
-          MetaStoreListenerNotifier.notifyEvent(listeners,
-                                                EventType.ADD_PARTITION,
-                                                new AddPartitionEvent(tbl, 
partitionSpecProxy, true, this),
-                                                null,
-                                                
transactionalListenerResponses, ms);
+        try {
+          if (!success) {
+            ms.rollbackTransaction();
+            cleanupPartitionFolders(addedPartitions, db);
+          }
+          if (!listeners.isEmpty()) {

Review comment:
       could we call unlock here?, before even propagation?




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

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