Skip to content

Add pessimistic locking on Competition aggregate root to close the write-skew window #521

Description

@antonpampukha

Acceptance Criteria

  • New findByIdForUpdate() in CompetitionRepository with @Lock(PESSIMISTIC_WRITE) + lock timeout.
  • HierarchyValidator.validateImmutabilityByCompetitionId() and CompetitionServiceImpl.changeStatus() use it instead of findById().
  • It has been confirmed (via an integration test) that concurrent publish and delete operations for the last round are serialized correctly—the final state is always valid.

Activity

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

Metadata

Metadata

Assignees

Labels

Type

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions