Skip to content

bug: never overwrite a recorded round - #419

Open
lukepolo wants to merge 1 commit into
mainfrom
bug/score-event-round-guard
Open

lukepolo wants to merge 1 commit into
mainfrom
bug/score-event-round-guard

Conversation

@lukepolo

Copy link
Copy Markdown
Contributor

A restarted game server came back at 0-0 and published its own round 1. The score upsert overwrote the real round and its backup file, so the later restore loaded a backup with no players in it.

  • a score for a round that is already recorded is rejected and the server is sent get_match to re-sync
  • an identical redelivery is a no-op (it may only fill in a missing backup)
  • a backup with no players, or for a different round, is stored as no backup
  • replays after a restore still work: the restore soft-deletes the rounds they replace

Pairs with 5stackgg/game-server#185.

- a score for a round that is already recorded (or an earlier one) comes from
  a server that is behind the backend; it is rejected and the server is told to
  re-sync instead of overwriting the real round and its backup
- an identical redelivery is a no-op, and may only fill in a missing backup
- a backup with no players or for another round is stored as no backup
- rounds replayed after a restore are unaffected: the restore soft-deleted the
  ones they replace
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