jun-he edited a comment on issue #726: Improve multi-threading in 
BaseRewriteManifests
URL: 
https://github.com/apache/incubator-iceberg/issues/726#issuecomment-583285403
 
 
   @aokolnychyi  Here, the thread pool used in `performRewrite` seems to be a 
shared one 
(https://github.com/apache/incubator-iceberg/blob/master/core/src/main/java/org/apache/iceberg/util/ThreadPools.java#L60).
   
   If the same BaseRewriteManifests object's `apply` method was called twice at 
the same time, it is possible that the same WriterWrapper object was accessed 
by two different threads in this shared thread pool.
   
   If this won't happen, I think we can drop `synchronized` in WriterWrapper.
   Otherwise, an alternative is to add synchronization around `performRewrite` 
and drop  `synchronized` in WriterWrapper.
   

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


With regards,
Apache Git Services

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

Reply via email to