[08:26:17] <pagios> morning, i have a question please about concurrency and nodejs, say i have a variable that is being read from mongo and that is being manipulated/changed via an api call. This api call changes the value and update it in DB. I would like this variable to stay as consistent in concrreutn api requests. which means what happens if 2 requests for example come at the exact righ time, read that value and each update? I would end up with the latest one
[08:26:18] <pagios> overwriting the previous update and have an inconsistency. How do i approach this? Thank you
[22:17:59] <dengi> File "/home/xxx/xxx/nsmmongo.py", line 401, in mongoScan