Skip to content

Tournament Termination Updated - #203

Open
aashikasuresh226 wants to merge 3 commits into
stagingfrom
tournament-termination-fix
Open

Tournament Termination Updated#203
aashikasuresh226 wants to merge 3 commits into
stagingfrom
tournament-termination-fix

Conversation

@aashikasuresh226

Copy link
Copy Markdown

Stopping tournaments before they complete normally.

Added:

  • a separate TERMINATED tournament status.

  • a skipped game-match status.

  • the admin endpoint:

    POST /api/v1/admin/competition/{competitionSlug}/tournament/{uuid}/stop

  • Prevented terminated tournaments from queueing new matches.

  • Ignored late queue results for terminated tournaments and skipped matches.

  • Preserved completed matches and their results.

  • Added pessimistic locking when terminating a tournament.

  • Replaced the nested game lookup pattern with one query that retrieves all tournament games.

  • Added a Flyway migration for the new PostgreSQL enum values.

  • Added integration test coverage for the termination workflow.

When an admin stops a tournament:

  1. Completed matches remain unchanged.
  2. Unfinished tournament matches are marked SKIPPED.
  3. Unfinished game matches are marked skipped.
  4. The tournament is marked TERMINATED.
  5. No new tournament matches are queued.
  6. Late results received for the terminated tournament are ignored.
  7. Tournament data is not deleted.

COMPLETE continues to represent a tournament that finished normally, while TERMINATED represents one that was stopped early.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant