Question: After an upgrade from MongoDB 4.4 to MongoDB 5 some start up warning signs have appeared . {"t":{"$date":"2023-01-20T13:35:05.354+00:00"},"s":"I", "c":"REPL", "id":5569202, "ctx":"ReplCoord-0","msg":"** WARNING: The default write concern may change when upgrading to 5.0. Use setDefaultRWConcern to set a cluster-wide default write concern that won't change.","tags":["startupWarnings"]} What is the fix ? Answer: db.adminCommand( { setDefaultRWConcern : 1, defaultWriteConcern: { "w" : "majority" } } )
Read more →