danny0405 opened a new pull request, #20297: URL: https://github.com/apache/hudi/pull/20297
### Describe the issue this Pull Request addresses The table-state refactor in #20078 introduced a copy of the table properties every time `HoodieLogFormatReader` opens a native log file. Native data blocks do not use these properties, and native delete blocks only read them, so repeated copies add unnecessary allocation during log scans. ### Summary and Changelog - Keep one `Lazy<TypedProperties>` on `HoodieLogFormatReader`, shared with its native log readers. - Resolve the lazy copy only when `HoodieNativeLogFileReader` creates a delete block. Subsequent native delete files reuse the same copy; native data and legacy files do not trigger it. - Adapt the direct `HoodieLogFormat.newReader` path with `Lazy.eagerly`, preserving its existing use of the table properties. - No code was copied from another project. ### Impact Reduces properties copying from once per native log file to at most once per `HoodieLogFormatReader`, while retaining a separate properties object from the table config on that path. This changes the common/core read path without changing public APIs, configuration, storage formats, or expected read results. Timeline loading and listing are unchanged. ### Risk Level low Native readers share one properties copy whose current consumers only read it. Constructor call sites are updated together; lazy initialization occurs before constructing a native delete block. Validation with JDK 17: all 9 tests in `TestHoodieFileGroupReaderNativeLogs` passed, including native data/delete files and mixed native/legacy logs. Maven checkstyle passed. ```sh mvn -pl hudi-hadoop-common -am -Dtest=TestHoodieFileGroupReaderNativeLogs -Dsurefire.failIfNoSpecifiedTests=false -DfailIfNoTests=false test ``` ### Documentation Update none — internal allocation optimization with no new feature, configuration, or user-facing behavior change. ### Contributor's checklist - [x] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute) - [x] Enough context is provided in the sections above - [ ] Adequate tests were added if applicable No new tests were added for this allocation-only change; the existing native-log regression suite was run. -- 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]
