ad1happy2go opened a new pull request, #20394: URL: https://github.com/apache/hudi/pull/20394
### Describe the issue this Pull Request addresses closes #20393 Upgrading a 0.x table (version 6) to version 8+ fails with an NPE in `ActiveActionWithDetails.fromInstantAndDetails` when the legacy archived timeline contains an instant with no completed state, such as a commit archived with only its REQUESTED record. `LegacyArchivedMetaEntryReader` passes every group of same-time records to `fromInstantAndDetails`, which requires a completed instant. ### Summary and Changelog The legacy archived timeline reader now skips, with a warning, any archived instant that has no completed state, so the upgrade converts the rest of the archived history instead of failing. These instants never completed, so they are not part of the committed timeline. - `LegacyArchivedMetaEntryReader`: grouping moved into `readNextInstantGroup()`; `hasNext()` skips groups without a completed instant. - `TestLegacyArchivedMetaEntryReader`: new test archiving a requested-only commit, a requested + inflight commit, and a commit whose requested/inflight and completed records are in different blocks. Without the fix it fails with `NullPointerException at ActiveActionWithDetails.fromInstantAndDetails(ActiveActionWithDetails.java:85)`; with the fix only the completed instants are returned. ### Impact Tables whose legacy archive contains never-completed instants can now be upgraded to version 8+ with the full archived history converted. Behavior for well-formed archives is unchanged. ### Risk Level low. Only groups that would previously have thrown are affected; an instant whose completed record is in a separate block still converts from that record. ### Documentation Update none ### 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 - [x] Adequate tests were added if applicable -- 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]
