akctba / akctba/secret-santa-go-api

SQLite is not suitable for production use with concurrent clients

Abierto
#26 0 comentarios 0 reacciones 0 asignados Ver en GitHub
enhancement
Lenguaje dominante
Go
Estrellas
0
Forks
0
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

## 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`

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.