Skip to content

Conversation

@suryaprasanna
Copy link
Contributor

Describe the issue this Pull Request addresses

This PR adds comprehensive test coverage for write conflict scenarios in optimistic concurrency control mode. Previously, there were no tests validating the behavior of different conflict resolution strategies when parallel operations conflict with each other.

Summary and Changelog

Added parameterized tests to validate write conflict handling with different conflict resolution strategies.

Changes:

  • Added conflictResolutionStrategyParams() method source providing PreferWriterConflictResolutionStrategy and SimpleConcurrentFileWritesConflictResolutionStrategy as test parameters
  • Added testParallelInsertOverwriteOperations parameterized test that validates:
    • Two concurrent insert-overwrite operations targeting the same partitions
    • Second operation should fail with HoodieWriteConflictException when trying to commit after the first one completes
    • Tests behavior with both conflict resolution strategies
  • Added testParallelClusteringAndUpdateOperation parameterized test that validates:
    • Concurrent clustering and update operations on the same partition
    • With PreferWriterConflictResolutionStrategy: update succeeds, clustering fails with HoodieWriteConflictException
    • With SimpleConcurrentFileWritesConflictResolutionStrategy: update itself fails with HoodieWriteConflictException
    • Tests behavior with both conflict resolution strategies

Impact

No user-facing changes. This is a test-only addition that improves coverage for optimistic concurrency control and conflict resolution strategies, ensuring write conflicts are properly detected and handled.

Risk Level

none - Test-only change with no impact on production code.

Documentation Update

none

Contributor's checklist

  • Read through contributor's guide
  • Enough context is provided in the sections above
  • Adequate tests were added if applicable

@github-actions github-actions bot added the size:M PR with lines of changes in (100, 300] label Dec 6, 2025
@hudi-bot
Copy link
Collaborator

hudi-bot commented Dec 6, 2025

CI report:

Bot commands @hudi-bot supports the following commands:
  • @hudi-bot run azure re-run the last Azure build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M PR with lines of changes in (100, 300]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants