Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

duplicate key error #6

Closed
mike-aungsan opened this issue Jan 11, 2014 · 2 comments
Closed

duplicate key error #6

mike-aungsan opened this issue Jan 11, 2014 · 2 comments

Comments

@mike-aungsan
Copy link

I got the following error.

When the process too fast, it generate duplicate key.

MongoError: E11000 duplicate key error index

Either JavaScript Pseudo random is not good.

I also think Timestamp have a problem too by looking at the key.

Let say, node is running with cluster and more then 10 thread. It is highly possible that both Timestamp and Pseudo random will be the same with high hit.

A way to let user add just one digit will be good enough I guess.

@ericelliott
Copy link
Collaborator

Can you provide a gist that demonstrates a way to reproduce this problem?

@mike-aungsan
Copy link
Author

Test a few more times. Could not reproduce the problem. Probably a bug in middleware or could be random generator.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants