Follow dba-ninja.com

Subscribe to RSS feed  Follow @jackvamvas - Twitter

*Use the Comments section for questions

dba-ninja.com Links

Dba_db2_button

Sqlserver_dba_button

The default write concern may change when upgrading to 5.0

24 January,2023 by Rambler

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" }
  }
)

 


Author: Rambler (http://www.dba-ninja.com)


Share:

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment on The default write concern may change when upgrading to 5.0


dba-ninja.com