Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replays: Implement retry mechanism for database operations #10799

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

DieterReinert
Copy link
Contributor

Add retry logic to handle transient database errors in the Replays module.

This update introduces a retry mechanism for database insert operations within the Replays class to enhance stability and prevent crashes caused by transient issues such as network interruptions or temporary database unavailability.

By implementing this retry logic, the system can recover from intermittent errors without requiring manual intervention.

Add retry logic to handle transient database errors in the Replays module.

This update introduces a retry mechanism for database insert operations within the `Replays` class to enhance stability and prevent crashes caused by transient issues such as network interruptions or temporary database unavailability.

By implementing this retry logic, the system can recover from intermittent errors without requiring manual intervention.
@DieterReinert
Copy link
Contributor Author

Fixes:
An async chat command crashed: error: result is ambiguous: error=ba: ConditionalPut [/Table/113/1/"gen9unratedrandombattle-2275930855"/0,/Min), EndTxn(parallel commit) [/Table/113/1/"gen9unratedrandombattle-2275930855"/0], [txn: b4d57af6], [can-forward-ts] RPC error: grpc: error reading from server: read tcp [fdb8:5ebb:f7fe:101::1]:35002->[fdb8:5ebb:f7fe:101::3]:26257: use of closed network connection [code 14/Unavailable] [propagate]
at /home/ps/main/node_modules/pg-pool/index.js:45:11
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at Object.add (/home/ps/main/server/replays.ts:98:4)
at GameRoom.uploadReplay (/home/ps/main/server/rooms.ts:2072:20)
at CommandContext.savereplay [as handler] (/home/ps/main/server/chat-commands/core.ts:1149:3)

@DaWoblefet DaWoblefet requested a review from mia-pi-git January 10, 2025 06:35
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