Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

187
Visualizações
How does Builders<TA>.Update.Set() handle parallel access?

Assuming 'items' (provided as a parameter in the Set() method below) is defined as List (TM is some structure type, i.e. made of properties only) containing only one item, and 10 processes trying to write simultaneously an update to items (without adding anything to the List):

Builders<TK>.Update.Set("Items", items);

An update means that there is at least one element in the BSON with a modified value.

What will MongoDB in such case?

Will it eventually overwrite with the last process into that single element (leaving that List with a single element)?

Or will it add 10 such elements (items) into that List?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

I don't know how doesit work with parallel access. But Set operator always overwrite value with an inserted.

To add new values to an array you should use addToSet operator (it adds only new values) or push operator.

You could access them as Builders too:

Builders<TA>.Update.AddToSet
Builders<TA>.Update.Push
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda