The _id information in a collection entry is really unique?

This is the function generating your collection documents _ids

It uses if available either

  $objId = new \MongoDB\BSON\ObjectId();

(which is what MongoDB normally uses for their _ids https://docs.mongodb.com/manual/core/index-unique/; see also Generating Globally Unique Identifiers for Use with MongoDB | MongoDB Blog )

or a “mongo db like id”, based on

  • the timestamp in ms
  • a “random” 5 char integer
  • a “random” 2-3 char integer

binaried, hashed and hexed.

Both seem to be setup to create a very unique ID in forever UNLESS you generate

*) 89000 * 990 ~ 88mill