prashantwason opened a new pull request, #18089: URL: https://github.com/apache/hudi/pull/18089
### Describe the issue this Pull Request addresses This PR addresses the issue where a concurrent rollback operation targeting an ongoing commit can proceed without detection, potentially causing data inconsistency. issue: #16128 ### Summary and Changelog **Summary:** Handle conflict detection between an ongoing rollback and commit operations, where the rollback targets the ongoing/pending commit. **Changelog:** - Added `ROLLBACK_ACTION` handling in `ConcurrentOperation.java` to extract the rolled back commit timestamp from the rollback plan - Added `isRollbackConflict()` and `isRollbackOperation()` methods in `SimpleConcurrentFileWritesConflictResolutionStrategy.java` to detect when a rollback targets the current commit - Added `getCandidateInstantsForRollbackConflict()` in `PreferWriterConflictResolutionStrategy.java` to include pending rollback instants as candidates for conflict resolution - Added test utilities and unit tests for rollback conflict scenarios ### Impact - When a rollback operation targets an ongoing commit, the system now throws `HoodieWriteConflictException` instead of allowing both operations to proceed - This prevents potential data inconsistency during concurrent operations - No changes to public APIs ### Risk Level low - This change adds additional conflict detection logic without modifying existing behavior for non-rollback operations. The new behavior only triggers when a rollback specifically targets an ongoing commit. ### Documentation Update none - This is an internal conflict resolution enhancement with no user-facing configuration changes. ### 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]
