Description Usage Arguments Examples
This is an optional method to set the write concern for a given Mongo DB connection. By default the Mongo DB library does not check if a write (insert, update, remove) actually succeed.
1 | dbSetWriteConcern(rmongo.object, w, wtimeout, fsync, j)
|
rmongo.object |
RMongo object containing the database connection information. |
w |
Number of write to aknowledge. -1 Don't even report network errors. 0 Don't wait for acknowledgement from the server. 1 Wait for acknowledgement but don't wait for secondaries to replicate. 2+ Wait for one or more secondaries to also acknowledge. |
wtimeout |
How long to wait for slaves before failing. 0 indefinite. Greater than 0 milliseconds to wait. |
j |
Wait for group commit to journal. |
fsync |
Force fsync to disk. |
1 2 3 | mongo <- mongoDbConnect("test")
dbSetWriteConcern(mongo, 1, 0, FALSE, FALSE)
dbDisconnect(mongo)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.