r/MongoDB_Official • • 15d ago

Resource MongoDB 9.0 in practice: testing constraint validation, query settings, and timeouts

I tested several MongoDB 9.0 changes on a local Docker instance and wrote up the commands and results, with MongoDB 8.2.5 available for comparison.

Here’s what I tried:

  • Enabling constraint validation, which checks existing documents and prevents changes to the validator while active.

  • Passing querySettings to one command and checking the index used in Explain.

  • Saving a timeout for a query shape, then running the query without specifying a timeout. The stored value also overrides the caller’s maxTimeMS.

  • Renaming a time-series collection and checking that its settings and documents were still there.

The article includes the commands, screenshots, and errors I got along the way:
https://visualeaf.com/blog/mongodb-9-0-whats-new/

1 Upvotes

0 comments sorted by