We are happy to announce that MongoDB version 4.2 has passed our tests and is generally available on the ObjectRocket platform.
What’s New in MongoDB 4.2
You can get the full list of what is available in the MongoDB 4.2 release notes. Here are some of the updates and changes we wanted to highlight:
Sharding
Distributed multi-document transactions: In version 4.0, MongoDB introduced transactions on Replica-Sets only. MongoDB 4.2 expands multi-document transactions support to sharded clusters.
Mutable shard keys: Before MongoDB 4.2 the value of the shard key was immutable. With the enhancement of distributed transactions, shard keys value can now change. Just remember that you can only change the shard key value, not the shard key field(s).
You can read more about the changes related to sharded clusters here.
Increased Security
MongoDB 4.2 adds TLS options that are meant to replace SSL options (SSL is deprecated to 4.2). Additionally, client-side field level encryption is introduced that helps you to protect sensitive data. Read more on security improvements here.
Removes MMAPv1 storage engine
MongoDB 4.2 only supports WiredTiger storage engine. If you are still using MMAPv1 our support team can help you complete the transition to WiredTiger without service disruption. Simply open a ticket here and we will start working with you.
Bug Fixes
As with every major version, 4.2 fixes bugs that aren’t backported. Put simply, this means that some bugs affecting older versions are fixed in 4.2 but never backported for different reasons in previous versions, like 4.0 and 3.6.
General Enhancements
Aggregation improvements: MongoDB 4.2 supports on-demand materialized views. Using the $merge operator allows users to save the aggregation output to a collection. $merge operator provides more flexibility compared to the $out operator and can help you enhance your security model.
Hybrid index builds: MongoDB removes the foreground/background index builds by introducing the hybrid index builds. Hybrid index builds don’t block database operations and at the same time, the build time is faster than a background index.
Wildcard Indexes: Wildcard indexes supporting queries against fields whose names are unknown or arbitrary. You can now index entire subdocuments without knowing their structure.
You can read more about the changes related to indexing and aggregation here.
What Happens Next?
Set up a call with our support team and we’ll put an upgrade plan in place that fits your needs. We can help you get ahead of potential problems, avoid unplanned maintenance, and help you figure out development updates, driver settings, and/or set up maintenance windows.
New to MongoDB? Learn more about ObjectRocket for MongoDB.