Please file an issue with the driver to catch this and expose it.
Don't think that catching jnote is the correct resolution for this. I believe "err" should be set here ("nojournal"?). Compare j:true with --nojournal to w:2 without --replSet:
> db.runCommand({"getLastError":1,w:2})
|
{
|
"n" : 0,
|
"connectionId" : 3,
|
"wnote" : "no replication has been enabled, so w=2.0 won't work",
|
"err" : "norepl",
|
"ok" : 1
|
}
|
> db.runCommand({"getLastError":1,j:true})
|
{
|
"n" : 0,
|
"connectionId" : 3,
|
"jnote" : "journaling not enabled on this server",
|
"err" : null,
|
"ok" : 1
|
}
|
|
|
An warning is returned. Please file an issue with the driver to catch this and expose it.
> db.adminCommand("getCmdLineOpts")
|
{
|
"argv" : [...
|
"--nojournal"...]
|
},
|
"ok" : 1
|
}
|
> db.runCommand({getLastError:true, j:true})
|
{
|
"n" : 0,
|
"lastOp" : {
|
"t" : 1367429879,
|
"i" : 1
|
},
|
"connectionId" : 1,
|
"jnote" : "journaling not enabled on this server",
|
"err" : null,
|
"ok" : 1 }
|
|