tsreaper commented on code in PR #101:
URL: https://github.com/apache/flink-table-store/pull/101#discussion_r875508139


##########
flink-table-store-core/src/main/java/org/apache/flink/table/store/file/schema/SchemaManager.java:
##########
@@ -111,12 +123,16 @@ public Schema commitNewVersion(UpdateSchema updateSchema) 
throws Exception {
             Path finalFile = toSchemaPath(id);
             FileUtils.writeFileUtf8(temp, schema.toString());
 
-            Boolean success = lock.runWithLock(() -> 
temp.getFileSystem().rename(temp, finalFile));
-            if (success) {
-                return schema;
-            } else {
-                // retry
-                FileUtils.deleteOrWarn(temp);
+            boolean success = false;
+            try {

Review Comment:
   `try` should also cover file write. File write may be partial



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