kerneltime commented on code in PR #5524:
URL: https://github.com/apache/ozone/pull/5524#discussion_r1379351572


##########
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/io/KeyOutputStream.java:
##########
@@ -555,6 +565,12 @@ public synchronized void close() throws IOException {
       if (!isException) {
         Preconditions.checkArgument(writeOffset == offset);
       }
+      if (atomicKeyCreation) {
+        long expectedSize = blockOutputStreamEntryPool.getDataSize();
+        Preconditions.checkState(expectedSize == offset,

Review Comment:
   Since expect this failure mode to occur on a regular basis due to client 
connection issues, we should not be using pre condition but a simple check and 
skipping commit key if the entire key has not been written at close. We can add 
metrics to track how many over and under objects were uploaded.



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