yihua commented on PR #20321: URL: https://github.com/apache/hudi/pull/20321#issuecomment-6199267763
@nsivabalan thanks for the review. Addressed in the latest commit: - `onDiskDataSizeWithHeader` is validated against `[HFILEBLOCK_HEADER_SIZE, getOnDiskSizeWithHeader()]`, with a GZIP block test for one below the header size and one past the block (the two in-range bounds stay accepted), plus a test for a buffer that ends inside a header, at offset 0 and at a non-zero offset. - The constructor validates the raw sizes before deriving the checksum size, so a corrupt `bytesPerChecksum` cannot reach the chunk-count `IllegalArgumentException`, and the `-1` placeholder is gone. The one-array bound is computed in `long` math inside the validation; not unit-tested since it needs a buffer over 512 MiB. - Exception types: `append` throws `IllegalArgumentException` (bad input), `serialize` throws `HoodieIOException` like the read-side check. -- 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]
