simbadzina commented on code in PR #5145:
URL: https://github.com/apache/hadoop/pull/5145#discussion_r1028394821


##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/store/driver/impl/StateStoreFileBaseImpl.java:
##########
@@ -366,7 +375,7 @@ public <T extends BaseRecord> boolean putAll(
         }
       }
       // Commit
-      if (!rename(recordPathTemp, recordPath)) {
+      if (success && !rename(recordPathTemp, recordPath)) {

Review Comment:
   Good catch @mkuchenbecker, thanks. I've added a new variable. I prefer 
adding a new variable versus breaking out of the loop. That way we only skip 
renaming files with erroneous writes, and ordering of records isn't considered.



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