alexeykudinkin commented on a change in pull request #4264:
URL: https://github.com/apache/hudi/pull/4264#discussion_r824234447



##########
File path: 
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/io/storage/HoodieParquetWriter.java
##########
@@ -84,7 +84,7 @@ public HoodieParquetWriter(String instantTime,
   }
 
   @Override
-  public void writeAvroWithMetadata(R avroRecord, HoodieRecord record) throws 
IOException {
+  public synchronized void writeAvroWithMetadata(R avroRecord, HoodieRecord 
record) throws IOException {

Review comment:
       This is problematic in a few ways:
   
   1. This method is invoked in the hot-path, taking a lock in it would impact 
its performance considerably
   2. Taking locks without timeouts exposes us to potential dead-locks 

##########
File path: 
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/table/action/commit/SparkMergeHelper.java
##########
@@ -101,13 +101,13 @@ public void runMerge(HoodieTable<T, 
JavaRDD<HoodieRecord<T>>, JavaRDD<HoodieKey>
     } catch (Exception e) {
       throw new HoodieException(e);
     } finally {
+      if (null != wrapper) {

Review comment:
       Can you please rename `wrapper` to `executor` as well? `wrapper` is a 
complete misnomer




-- 
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: commits-unsubscr...@hudi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to