You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "BsoBird (via GitHub)" <gi...@apache.org> on 2024/07/24 03:26:12 UTC

Re: [PR] [core] Support commit isolation level [paimon]

BsoBird commented on code in PR #3805:
URL: https://github.com/apache/paimon/pull/3805#discussion_r1689056204


##########
paimon-common/src/main/java/org/apache/paimon/fs/FileIO.java:
##########
@@ -238,6 +238,9 @@ default boolean tryToWriteAtomic(Path path, String content) throws IOException {
         try {
             writeFile(tmp, content, false);
             success = rename(tmp, path);
+        } catch (IOException e) {
+            // try check once
+            success = exists(path) && !exists(tmp);

Review Comment:
   After throwing an IO exception, it's a good idea to check it again.Currently, this checking strategy is not fully applicable to object storage systems and may result in false positives.However, as the industry evolves, object storage systems are starting to support mutex operations.In the long run, I think we need to add check operations.



-- 
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: issues-unsubscribe@paimon.apache.org

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