akctba / akctba/secret-santa-go-api

SQLite is not suitable for production use with concurrent clients

Offen
#26 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement
Vorherrschende Sprache
Go
Sterne
0
Forks
0
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

## Problem

The application uses SQLite as its database. SQLite does not support concurrent writes — only one writer is allowed at a time, and under load this causes lock contention and request failures. This limits the ability to serve multiple web and mobile clients simultaneously in production.

## Expected Behavior

The database layer should support concurrent reads and writes without contention.

## Suggested Fix

Migrate to a production-grade database such as **PostgreSQL** or **MySQL**. The database interface in `database/` is already abstracted to some degree, which should make the migration feasible.

Consider making the DSN (Data Source Name) configurable via an environment variable so the same binary can target different databases in different environments.

## Affected Files
- `main.go`
- `database/database.go`
- `database/UserRepo.go`
- `database/GroupRepo.go`
- `database/ParticipantRepo.go`

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.