u/Rare-Strawberry175

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 ?

reddit.com
u/Rare-Strawberry175 — 8 days ago
▲ 5 r/MongoDB_Official+1 crossposts

Mongodb atlas index building time on new documents

When a new document is created it takes atleast 2-3 sec for that document to become searchable
Is there a way to fix it or decrease time from mongodb itself

reddit.com
u/Rare-Strawberry175 — 9 days ago