danny0405 commented on code in PR #13896:
URL: https://github.com/apache/hudi/pull/13896#discussion_r2357413010


##########
hudi-common/src/main/java/org/apache/hudi/avro/AvroRecordSizeEstimator.java:
##########
@@ -45,6 +80,11 @@ public long sizeEstimate(BufferedRecord<IndexedRecord> 
record) {
       return sizeOfRecord;
     }
     // do not contain size of Avro schema as the schema is reused among records
-    return sizeOfRecord - sizeOfSchema + 8;
+    long toReturn =  sizeOfRecord - sizeOfSchema + 8;
+    if (toReturn < 0) {

Review Comment:
   This check is invalid if the record size is huge itself.



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