rdblue commented on a change in pull request #3663:
URL: https://github.com/apache/iceberg/pull/3663#discussion_r762362325



##########
File path: 
core/src/main/java/org/apache/iceberg/hadoop/HadoopTableOperations.java
##########
@@ -353,8 +345,13 @@ int findVersion() {
    * @param src the source file
    * @param dst the destination file
    */
-  private void renameToFinal(FileSystem fs, Path src, Path dst) {
+  private void renameToFinal(FileSystem fs, Path src, Path dst, int 
nextVersion) {
     try {
+      HadoopTableOperations.releaseLock.lock();
+      if (fs.exists(dst)) {
+        throw new CommitFailedException(
+                "Version %d already exists: %s", nextVersion, dst);

Review comment:
       Does this need to be on a new line?




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