danny0405 commented on issue #20650: URL: https://github.com/apache/hudi/issues/20650#issuecomment-7062426742
@vamshipasunuru1, the retained 2021 rollback explains why the global-prefix proposals miss your timeline. I think the three guards can still mistake a rollback for archival. Consider an explicit rollback of the oldest completed, unsavepointed commit `A` on a COW table with `LAZY` failed-write cleaning. Hudi applies the commit-order check under `EAGER`. It deletes the target instant’s files before marking the rollback complete. That allows these two snapshots, where `R` is the rollback of `A`. [Rollback order check](https://github.com/apache/hudi/blob/release-1.2.1/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/rollback/BaseRollbackActionExecutor.java#L216-L231) · [Rollback publication order](https://github.com/apache/hudi/blob/release-1.2.1/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/rollback/BaseRollbackActionExecutor.java#L275-L291) ```text Driver: A completed, B completed, C completed, R inflight Server: B completed, C completed, R inflight ``` All three guards pass. `A` predates `B`, `R` is still pending on both sides, and the server has no pending `A`. Yet rollback removed `A`. This is a test case inferred from the code. The reported incident itself is consistent with archival. **For the repeated syncs, I’d let a read-only listing request advertise that its client can fall back locally.** The server could then apply these rules before calling `view.sync()` or building the listing: 1. Serve remotely when the existing full comparison succeeds, including the single-trailing-clean exception. Keep the final consistency check. 2. If the full comparison still fails but the last requested time matches `lastinstantts` (allowing one newer completed clean at the server tail), return the existing HTTP 400 immediately to an opted-in `REMOTE_FIRST` client. Its existing handler retries the listing locally. 3. For other mismatches or clients without the flag, use the existing sync-and-validate path. This preserves the chance for a warm server to catch up when the client has a newer last instant. [Request handler](https://github.com/apache/hudi/blob/release-1.2.1/hudi-timeline-service/src/main/java/org/apache/hudi/timeline/service/RequestHandler.java#L597-L625) · [Client fallback](https://github.com/apache/hudi/blob/release-1.2.1/hudi-common/src/main/java/org/apache/hudi/common/table/view/PriorityBasedFileSystemView.java#L100-L113) On your trace, removing the 13:04 clean leaves the same 11:04 tail on both sides. The 33 archived commits still cause a hash mismatch, so each task can fall back with zero server syncs and zero discarded partition listings. An older late completion with the same tail would also take the local path, even if a sync could have served it remotely. That’s the trade-off. I’d test both cases with real files and assert the file groups returned as well as the sync count. -- 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]
