Skip to content

fix(leaderboards): prevent publication from stalling WebSocket processing - #42

Draft
tintinhamans wants to merge 1 commit into
GeneralsOnlineDevelopmentTeam:mainfrom
tintinhamans:fix/nonblocking-leaderboard-publication
Draft

fix(leaderboards): prevent publication from stalling WebSocket processing#42
tintinhamans wants to merge 1 commit into
GeneralsOnlineDevelopmentTeam:mainfrom
tintinhamans:fix/nonblocking-leaderboard-publication

Conversation

@tintinhamans

Copy link
Copy Markdown
Contributor

Lobby teardown awaited external leaderboard publication on the WebSocket/lobby path.
HTTP calls, ELO updates, and retries could therefore stall processing for all connected
users.


  • Finalize match history and schedule publication in one database transaction.
  • Publish from a background worker using durable state on match_history.
  • Retry transient failures with persisted backoff, reject permanent 4xx failures.
  • Restore per-operation DbContext usage.
  • Remove Polly because retries are now handled durably by the worker.
  • Add schema changes and an upgrade script.

Apply upgrade_20260816_external_leaderboard_publication.sql before deployment.

The worker assumes a single service instance.

@STK0Cervanthes

Copy link
Copy Markdown
Contributor

this would also solve #40 right?

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.

2 participants