1602 / 1602/jugglingdb

Uniqueness validation is prone to race conditions.

Aberta
#391 14 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
JavaScript
Estrelas
2k
Forks
238
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

I'm not really sure what can be done about this, since any fix would likely be at the adaptor level. We currently see uniqueness violations when two model instances with an identical (asserted unique) field are _created_ very close together (i.e. close enough that the uniqueness has been tested for both before the first new instance is created). For example, if you create two new users with the same (should be unique) username at the same time, then they will succeed.

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Direção de pesquisa

The issue describes a race condition in uniqueness validation across multiple database adapters. Start by examining the validation logic in the ORM's core and the adapter-specific implementations for transactions or locking. Look at how unique constraints are enforced at the database level versus the application level. Testing will require simulating concurrent creation requests.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
javascript, mongodb, mysql, nodejs, postgresql, redis, sqlite
Domínio
backend, databases
Tipo de issue
Bug
Dificuldade
4/5
Tempo estimado
3-5 dias
Status de atividade
Estagnada
Clareza
Razoavelmente clara
Facilidade para iniciantes
30/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.