diff options
Diffstat (limited to 'internal/game/account_txn.go')
| -rw-r--r-- | internal/game/account_txn.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/internal/game/account_txn.go b/internal/game/account_txn.go index a1a5cf0..77a4219 100644 --- a/internal/game/account_txn.go +++ b/internal/game/account_txn.go @@ -482,8 +482,11 @@ func equalsFold(a, b string) bool { return true } -// recoverJournals rolls back leftover lifecycle journals at startup and -// surfaces unrecoverable ones. +// recoverJournals rolls back leftover lifecycle journals and surfaces +// unrecoverable ones. It scans every journal in the directory, so it must run +// only where no other transaction can be in flight: at startup, or on the game +// owner goroutine (which serializes every transaction). The mid-game caller in +// video_poker_banks.go is on the owner. func (g *Game) recoverJournals() { if err := persistence.Recover(g.journalDir()); err != nil { fmt.Fprintf(os.Stderr, "lifecycle journal recovery failed: %v\n", err) |
