mongoose-increment icon indicating copy to clipboard operation
mongoose-increment copied to clipboard

Duplicate sequence number is possible if model is saved in concurrency

Open slamuu opened this issue 7 years ago • 0 comments

Bug, feature request, or proposal:

bug

What is the expected behavior?

Unique sequence number in all cases

What is the current behavior?

If two or more models are saved at the same time, they will get duplicate sequence number

What is the use-case or motivation for changing an existing behavior?

Incrementation should create unique sequence number

Is there anything else we should know?

Since there is no transaction locking in mongodb, I dont know what would be a good way to fix or prevent this

slamuu avatar Jul 30 '17 01:07 slamuu