Closed BeMoreDifferent closed 11 years ago
You've create a race condition. Basically you have 100 findOne's happening simultaneously. They're most likely all going to return values before any of the updates happen. Look into using an atomic increment in the update call.
Nice. It works and is amazing fast. By the way: you did a great job with creating this module :) Thank you for building it
Hi. I have a strange problem. I try to update some collection really often. It`s mostly the same system like a usercounter- script: if key is give update key +1 else creat key. This script looks like this:
If I submit this script the collection get updated ones while there are 100 loops wich should update the collection. How can i solve this problem? Did I miss anything?
Hope anybody can help me Daniel