Details
-
Bug
-
Resolution: Won't Fix
-
Major - P3
-
None
-
2.6.10
-
None
-
ALL
-
Description
When a replset contains a default write concern via getLastErrorDefaults, if the set is reconfigured to then remove this, explicit calls to getLastError will fail with:
{
|
"lastOp" : Timestamp(1431320964, 3),
|
"connectionId" : 1,
|
"n" : 0,
|
"badGLE" : {
|
|
|
},
|
"ok" : 0,
|
"errmsg" : "write concern object cannot be empty",
|
"code" : 9
|
}
|
Write commands are unaffected, and work as expected.
Effective workarounds are:
- Restarting the affected mongod(s).
- Re-adding getLastErrorDefaults as { w: 1 }
Stepping down the primary is NOT a workaround (the new primary will have the same problem).
Reproducer jstest attached.
This doesn't affect 2.4.x (reason unknown), or 3.0.x/3.1.x (because in those versions, replset configs always explicitly include all options).