prathik-onehouse opened a new pull request, #20874: URL: https://github.com/apache/hudi/pull/20874
### Describe the issue this Pull Request addresses closes #20873 When a completed-instant delete fails during archival, the archivers have already removed the requested and inflight files of every instant in the batch, so newer instants are left with only their completed file. For a completed replacecommit this makes every later commit fail in the OCC schema conflict check (`Failed to check emptiness of instant`). ### Summary and Changelog `TimelineArchiverV1` and `TimelineArchiverV2` now delete one archived action at a time, oldest first, removing its requested, inflight and completed files before moving to the next. A failed delete leaves every newer action intact, and the oldest-first order still keeps the active timeline free of holes. The action whose delete fails can still lose its requested and inflight files, as before. The `hoodie.archive.delete.parallelism` doc is updated, since it now only applies to cleaning LSM timeline files. New tests in both archiver suites replace the oldest completed instant with a non-empty directory (a delete that always fails), run archival, and assert the newer actions keep all three files. Both fail on the old code with `expected: <[REQUESTED, INFLIGHT, COMPLETED]> but was: <[COMPLETED]>` and pass with the fix. ### Impact Deleting archived instants from the active timeline is now fully sequential instead of running the requested/inflight deletes in parallel, so that step is roughly 2-3x slower (about a second for a normal batch). Each action's requested and inflight deletes could run in parallel safely, since the instant reads as completed while its completed file exists; they are left sequential for simplicity. ### Risk Level low. Only the delete order changes; which instants get archived is unchanged. The existing archiver suites pass. ### Documentation Update The `hoodie.archive.delete.parallelism` config description is updated in this PR. ### 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]
