How do I do a "safe" write that flushes to disk immediately from javascript? I'd like to be able to do this from both the shell and a stored javascript "CRUD" procedure. Is it just a matter of:
db.foo.insert({stuff: "yes", meta: "physics"});
db.runCommand( "getlasterror" ) ;
The wiki is unclear on this.