Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

188
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda