gaoyan1998 opened a new issue, #2960:
URL: https://github.com/apache/incubator-paimon/issues/2960

   ### Search before asking
   
   - [X] I searched in the 
[issues](https://github.com/apache/incubator-paimon/issues) and found nothing 
similar.
   
   
   ### Motivation
   
   At `https://paimon.apache.org/docs/master/maintenance/dedicated-compaction/` 
   It says here  `For S3-like object store, its does not have atomic semantic. 
` ,so there may be problems with concurrent writes,
   And I also encountered this situation, specifically in 
FileStoreCommitImpl.java submit snapshots need to rename the temporary file, if 
another program also write this snapshot will lead to throw the file already 
exists exception.
   code like this
   
![image](https://github.com/apache/incubator-paimon/assets/34333571/b228a30c-1588-45d8-aa78-6084159cf226)
   
   
   ### Solution
   
   s3 does not have a rename interface, generally through the mv 
implementation, in my impression s3 mv operation is indeed not atomic, but a 
single file operation should be atomic, 
   so here ,maybe?  catch the `FileAlreadyExistsException` and return as false 
it should,
   theoretically not affect the subsequent re-create the snapshot operation
   
   at HadoopCompliantFileIO.java
   
![image](https://github.com/apache/incubator-paimon/assets/34333571/62732cfe-2f17-42fd-8525-01be982c26e8)
   
   
   ### Anything else?
   
   Just a little idea
   
   ### Are you willing to submit a PR?
   
   - [ ] I'm willing to submit a PR!


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

Reply via email to