If you have ever installed Mongo 3.* version and worrying as to how to upgrade it to Mongo 4.x.
Then this story is for you, Mongo has made the upgrades comparatively easy.
This story is a brief overview as to how to upgrade Mongo and it is divided into three segments
Identification
While Migrating Databases from one node to another using
We landed into Unrecognized field 'snapshot'. mongo this error.
Debugging
We saw that there is a version mismatch as in source host being 4.2.x and target being 3.6.17 between both the mongo servers.
Now we have to take an immediate step to upgrade mongo and maintain the same version of mongo across the nodes. So that the dumps can be transferred between nodes.
Solution
Please note that you can update mongo DB only on Stepwise.
For instance, To upgrade from a version earlier than the 3.6-series, you
must successively upgrade major releases until you have upgraded to
3.6-series. For example, if you are running a 3.4-series, you must upgrade first to 3.6 before you can upgrade to 4.0.
This has three steps to do
Get the FeatureCompatibilityVersion
Set the FeatureCompatibilityVersion
Upgrade to the next stable version
How to get the FeatureCompatibilityVersion
Enter mongo shell and then type
db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } )
if the parameter is set you should be seeing a result similar to this
Always check versions on fellow nodes before deploying anything. If
the change is a minor version change its ok but if its major change
please try to stick to only one version :)
In this post we will start understanding an interesting topic in python i.e Unit_tests and most important of all while developing any software is understanding the actual use-case and be clear with the tests to be covered to verify the working of the use-case. Unit tests are that type of tests which are not considered as functional tests rather, It is used to do some basic testing of python definitions by sending some fake parameters to the actual definitions in source code and assert the expected values Say suppose now u have written a code to test whether a number is a prime or not we send some random value and check whether we get the expected value or not. So, our use-case is to check whether the number gave by user is prime or not? So, the tests to be checked are - Composite numbers shouldn't be returned as prime. - Negative numbers mustnot be considered as a prime number. - check when a prime number is given by user it returns True. mkdir test_1 ...
Comments
Post a Comment