MongoDB 3.2.0-rc3 is out and is ready for testing. This is the culmination of the 3.1.x development series.
Fixed in this release candidate:
- SERVER-20164: Finish unit tests for CatalogManagerReplicaSet::addShard
- SERVER-21287: $lookup should use $eq queries
- SERVER-21298: rollback_index.js fails to wait for replication before continuing
- SERVER-21292: replsets/remove1.js failed in replset_legacy suite
- SERVER-20937: Add mode to FSM framework that drives greater amount of load on the system
- SERVER-21099: Improve logging in SecureRandom and PseudoRandom classes
- SERVER-20402: Add Election Failover JS tests
- SERVER-21308: fsm-suite doesn’t wait long enough for the distributed lock when dropping a collection
- SERVER-20867: Integrate mongobridge into ShardingTest
- SERVER-21355: Coverity analysis defect 76731: Unchecked return value
- SERVER-21305: Lock ‘timeAcquiringMicros’ value is much higher than the actual time spent
- SERVER-21371: find_and_modify_concurrent_update.js join() is called after read
- TOOLS-983: mongorestore panic when restoring a compressed archive without using –gzip
Want to test the release? Get involved in the MongoDB Bug Hunt and enter for a chance to win some prizes for your contributions.
As always, please let us know of any issues.
– The MongoDB Team
MongoDB Authentication and Automation
MongoDB supports role-based authentication, so you can restrict access to your deployment for safety and security. Cloud Manager Automation makes enabling and managing your users easy. An important note before we begin: Authentication Settings made here apply to your entire Cloud Manager group. If you are using Automation, and it’s vital that different deployments in your group have different credentials, you will have to create a new Cloud Manager group for these deployment items and import them . Enabling Authentication If you already have authentication enabled, follow the normal importation into Automation methodolgy , especially noting the creation of a new automation-agent user, then you can skip this section and go on to the role and user management sections below. If you have an unauthenticated deployment: Click the “…” menu on your Deployment Page and choose “Authentication & SSL Settings” Click “Next” to get to the “Select Authentication Mechanisms” screen Select “Username/Password” and click “Next”. Click “Next” again to skip the SSL settings (a topic for this other post ). Now you will see the new users that will be automatically created for you. Click “Save” to create a new automation draft with your new users. Now you just have to “Review & Deploy” and “Confirm & Deploy” as normal. Beware: Clients without authentication will fail to connect after this point. Make sure your application is ready for this change. Check your drivers’ documentation on how to enable MongoDB authentication in your application. Role Management Let’s start with adding a new role: Head over to your “Authorization & Roles” tab When you click the “Add Role” button in the upper-right, you will be presented with a dialog to fill out: You can even add collection-level and other privileges if you want In my case, I’ve let my reader role also be able to do certain diagnostic actions Once the role is added, you just have to do the usual “Review & Deploy”/”Confirm & Deploy” to push this role out to your group. Once the role has been created, you can edit or remove it via the gear icon, as shown below. You can only edit custom roles, not built-in roles . Users Once you have the roles you need (if you need custom roles at all), you can start creating users. Head to your “Authentication & Users” tab Create a new user via the “Add User” button in the upper-right You can choose any custom or built-in roles you wish and enter the user’s password Once the user is added, you just have to do the usual “Review & Deploy”/”Confirm & Deploy” to push this user out to your group. Once the user has been created, you can edit or delete it via the gear. You cannot edit the built-in users for the agents. Removing Authentication Maybe you have moved your deployment into a private network and have decided to remove your authentication settings. Here’s how: Click the “…” menu on your Deployment page and select “Authentication & SSL Settings” Click “Next” to get to the “Authentication Mechanisms” screen and un-check “Username/Password” Click “Next” to skip the SSL settings, and then click “Save” When you next do a “Review & Deploy”/”Confirm & Deploy”, the Automation Agents will disable authentication. All your custom roles and users will remain cached in Cloud Manager in case you wish to re-enable authentication. You can edit them even when authentication is not enabled.
MongoDB Query API Webinar: FAQ
Last week we held a live webinar on the MongoDB Query API and our lineup of idiomatic programming language drivers. There were many great questions during the session, and in this post, what I want to do is share the most frequently asked ones with you. But first - here is a quick summary of what MongoDB Query API is all about if you are unfamiliar with it. What is MongoDB Query API? MongoDB is built upon the document data model . The document model is designed to be intuitive, flexible, universal, and powerful. You can easily work with a variety of data, and because documents map directly to the objects in your code, it fits naturally in your app development experience. MongoDB Query API lets you work with data as code and build any class of application faster by giving you extensive query capabilities natively in any modern programming language. Whether you’re working with transactional data, looking for search capabilities, or trying to run sophisticated real-time analytics, MongoDB Query API can meet your needs. MongoDB Query API has some unique features like its expressive query, primary and secondary indexes, powerful aggregations and transformations, on-demand materialized views, and more — enabling you to work with data of any structure, at any scale. Some key features to highlight: Indexes To optimize any workload and query pattern you can take advantage of a large set of index types like multi-key (for arrays), wildcard, geospatial, and more and index any field no matter how deeply nested it is within your documents. Fully featured secondary indexes are document-optimized and include partial, unique, case insensitive, and sparse. Aggregation Pipeline Aggregation pipeline lets you group, transform, and analyze your data to support any class of workload. You can choose from dozens of aggregation stages and over 200 operators to build modular and expressive pipelines. You can also use low-code tools like MongoDB Compass to drag and drop stages, examine intermediate output, and export to your programming language of choice. On-Demand Materialized Views The powerful $merge aggregation stage allows you to combine the results of your aggregation pipeline with existing collections to update and enrich data without having to recompute your entire data set. You can output results to sharded and unsharded collections while simultaneously defining indexes on each view Geospatial and Graph Utilize MongoDB’s built-in natively ability to store and run queries against geospatial data Use operators like $graphLookup to quickly traverse connected data sets These are just a few of the features we highlighted in the MongoDB Query API webinar. No matter what type of application you are thinking of building or managing, MongoDB Query API can meet your needs as the needs of your users and application change. FAQs for MongoDB Query API Here are the most common questions asked during the webinar: Do we have access to the data sets presented in this webinar? Yes, you can easily create a cluster and load the sample data sets into Atlas. Instructions on how to get started are here . How can I access full-text search capabilities? Text search is a standard feature of MongoDB Atlas. You can go to cloud.mongodb.com to try it out using sample data sets. Does VS code plugin support Aggregation? Yes, it does. You can learn more about the VS code plugin on our docs page. If you need to pass variable values in the aggregation, say the price range from the app as an input, how would you do that? This is no different than sending a query - since you construct your aggregation in your application you just fill in the field you want with value/variable in your code. Is there any best practice document on MongoDB query API to have stable performance and utilize minimum resources? Yes, we have tips and tricks on optimizing performance by utilizing indexes, filters, and tools here . Does MongoDB support the use of multiple different indexes to meet the needs of a single query? Yes, this can be accomplished by the use of compound indexes. You can learn more about it in our docs here . If you work with big data and create a collection, is it smarter to create indexes first or after the collection is filled (regarding the time to create a collection)? It is better to create the indexes first as they will take less time to create if the collection is empty, but you still have an option to create the index once the data is there in the collection. There are multiple great benefits of MongoDB’s indexing capabilities: When building indexes, there is no impact on your app’s availability since the index operation is online. Flexibility to add and remove indexes at any time. Ability to hide indexes to evaluate the impact of removing them before officially dropping them. Where do I go to learn more? Here are some resources to help you get started: MongoDB Query API page MongoDB University MongoDB Docs You can also check out the webinar replay here .