Hey Guys,I am using a counters collection for incrementing job_id in a job collection,the application creates new jobs at high frequency,due to which sometimes I get mongo error:-duplicate key error,I think since I am using node.js and due to its asynchronous behaviour,a job gets same job ID from the counter collection. What is the best method for high frequency creates to get an auto Increment id for a column.The need for a seperate key other than the default mongo uid was that we required automatically incrementing ID to easily identify a particular job and it's associated information throughout our application on different platformsThanks in advance
Submitted May 03, 2020 at 07:45PM by melgo44
No comments:
Post a Comment