Mongodb 3.6 take a look at part 1
The exciting moment finally came. After a mongodb listing day, mongodb finally released mongodb 3.6 RC3. It took the whole day to read release notes, and tried most of the features, and there were also pits. Interested partners can see it first.
Today’s article, will bring you a general overview, and give my personal experience of stepping on the pit.
Next, let me step on the pit for you.
Here, we can see how much security we attach to mongodb, put it first. So what should be noticed?
Through multiple roundsBitby blackmailAfter (I guess) without affecting the development efficiency, some changes were made, andbind_ipThe default value is modified to localhost, which is also a version that has been upgraded from a previous versionpitBecause I went to watch the replcaset directly because I swept by, so I stayed here for half an hour, almost GG.
So how to solve this problem? When you start, there will be a warning about this
So according to the prompt, we only need to add
--bind_ip_allOr add it to the configuration file
Other security enhancements
When using SSL, the opensslcipherconfig parameter is added
Now, as long as the server has enabled the authentication permission, the developer can only issue onegetMoreCursor request for
db.updateUser()Added inauthenticationRestrictionsParameter, which can be used to control the source IP of the request from the client side and the specified IP address of the server side of the request.(I always feel it necessary to make this function! I’m really out of my heart
AddedconvertToCappedMethod is used to store custom roles
In terms of aggregation, mongodb will perform well in every version update as always, and this time it is not too much, but I am not ready to introduce it here. Interested partners can read it by themselves or wait for the following articles to be added~
I have to mention that
$lookupCompared with that in 3.4 and 3.6
$lookupIt has been strengthened and can be coordinated
pipelineTo make better join table queries. Let’s refer to example
Other aggregate operators
This is a new method used in theadminUnder the library, operate the events of some instances
A new aggregation method for deleting a specified field in an aggregate
Array Update Operator Enhancements
Now you can pass
$Operator to make a one-time modification to all elements in the array, and this modification can be done by using the
$sumWait for the operator~
It can be done through
$condCondition operator, to achieve the uniform update of the elements that meet the conditions of the array.
mongo Shell Changes
In mongodb shell, some operation instruction sets for session are added
Deng Deng Deng Deng Deng~
This function is also recommended by me. Here is a brief description. Looking forward to sharing next time~
We can pass
$jsonSchemaOperator to further limit the creation of sets, but do not think that this is mongodb compromise to RDB.
Instead, mongodb kept himFlexibleFeatures, through the
requiredProperty to control which fields are mandatory and which can not be consistent.
And!!! Also added
descriptionAttribute, which is used to annotate the fields, so that other developers, including dbaers, can see at a glance.
In the replica set, some functions and instruction sets have been added, which are not the most attractive to me. What attracts me most is how to add authentication mode online now! No need to restart! That’s right. Say goodbye to those midnight windows! Only mongodb can do it! Only!
In addition, our oplog can also be hot reset!
Started discarding replica set agreement version 0
Replsetresizeoplog is added to hot reset the size of oplog, no need to restart!
An instruction set is added to control the number of concurrent tasks for sharding
A similar UUID is added to each collection
An index cannot be named with an asterisk*
Now if there are any documents on the multi key index, you can index them
listDatabaseSome parameters have been added https://docs.mongodb.com/master/reference/command/listDatabases/#dbcmd.listDatabases
Now network transmission, supportzlibThe protocol is compressed
OK, today’s content will be shared here. The next time the content is a little tangled, will you give me some advice? You can either personally believe me or leave a message below.
Online authentication mode of mongodb 3.6 replcaset
Interpretation of mongodb 3.6
I am Shanghai xiaopang [miracle young], focusing on the Devops of mongodb, mysql, redis and other open source databases, embracing open source and accepting fees.
Original address of Shanghai xiaopang https://segmentfault.com/u/shanghaixiaopang/articles
Welcome to comment.
Every Friday, please look forward to Shanghai xiaopang.
If Xia Yuhe is still waiting for me by Daming Lake, I will not change.