SetSafe with Safe.J=true causes an error in Mongo 2.6.3 when journalling is disabled
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mgo |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
If I call SetSafe, with Safe.J=true, then I get an error if mongod was started with --nojournal. This conflicts with the documentation, which says:
"Since MongoDB 2.0.0, the safe.J option can also be used instead of FSync to force the server to wait for a group commit in case journaling is enabled. The option has no effect if the server has journaling disabled."
It appears that Mongo behaviour has changed. Either the mgo docs need changing, or mgo needs to somehow deal with 2.6.x differently. I've captured the SetSafe error message below:
... value *errors.errorString = &errors.
Indeed. It's a shame that their behavior has changed, as it forces the code to change according to server flags users decide to use. I'll ponder a bit on what to do there.