2 / 3
May 2024

Hello, I am new to this community forum, so I hope I create this topic correctly.

We have recently upgraded our cluster to mongodb v5.0 and I was testing building an empty cluster. The cluster consists of 1 primary, 1 secondary and an arbiter.

We had issues when adding the arbiter node to the cluster. I have been researching the issue and I believe the problem is the setting for ‘defaultWriteConcern’ . I understand that the default value changed from ‘1’ to ‘majority’ in Mongodb v5.0 - which I understand can be an issue when using arbiters. Although from what I read, the default value is configured differently when arbiters are used.

In order to test this, I want to check the value of the WriteConcern using this command:

db.adminCommand({ getDefaultRWConcern: 1})

The command executes correctly, but I can’t see any value.

Wondering if I am doing something wrong?

Thanks for any help anyone can give me

Claire

Hi @Claire_Tully and welcome to the community!
Which member are you running the command on?

Has mentioned from the documention:

getDefaultRWConcern - MongoDB Manual v7.0

“You can issue getDefaultRWConcern against any data-bearing member of the replica set (i.e. not against an arbiter).”

Regarding the following, I refer you to the documentation:

Write Concern - MongoDB Manual v7.0

Best Regards

Hi. I was running from the primary node. However, I have now fixed my problem by updating the defaultRWConcern value from the default ‘majority’ to ‘1’. This has fixed the issue. But I have a further question.

Where can I put this different config so that when building the cluster from scratch, it is automatically picked up? Can I put it in the mongo conf file?

Thanks,