Mongodb custom incremental id
I am looking for a way to generate custom incremental id, like lets say TICKET_1, TICKET_2 ans so on
Normally i do so by setting up a counter and using inc op to get new count
But this is not atomic , it fails to generate 100 ids if 100 req are in parallel
Is there a better way to do it ?
u/Rare-Strawberry175 — 8 days ago