We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mongod has support writeConcern for findAndModify command since v3.2
https://docs.mongodb.com/v3.4/reference/command/findAndModify/#dbcmd.findAndModify(the Output part still not update)
If the cluster has been set with getLastErrorDefaults like:
` "getLastErrorDefaults" : {
"w" : "majority", "wtimeout" : 5000
} `
The cluster has 5 nodes and 3 of them have been locked by fsyncLock(). The test result returned from Mongod (v3.4) about a findAndModify command like
findAndModify: { "lastErrorObject" : { "n" : 1, "updatedExisting" : true }, "ok" : 1, "writeConcernError" : { "code" : 64, "errInfo" : { "wtimeout" : true }, "errmsg" : "waiting for replication timed out", "codeName" : "WriteConcernFailed" }, "value" : { "fid" : 367585860, "_id" : "5afbf542588399814fe36b5a" } }
The findAndModify result define in mgo seesion.go did not deal with writeConcernErr,in detail:
` type valueResult struct {
Value bson.Raw LastError LastError `bson:"lastErrorObject"`
}`
The text was updated successfully, but these errors were encountered:
Hi @Mei-Zhao
This mgo fork is a community project - we'll happily accept a PR for findAndModify!
findAndModify
Dom
Sorry, something went wrong.
No branches or pull requests
mongod has support writeConcern for findAndModify command since v3.2
https://docs.mongodb.com/v3.4/reference/command/findAndModify/#dbcmd.findAndModify(the Output part still not update)
If the cluster has been set with getLastErrorDefaults like:
` "getLastErrorDefaults" :
{
} `
The cluster has 5 nodes and 3 of them have been locked by fsyncLock().
The test result returned from Mongod (v3.4) about a findAndModify command like
findAndModify: { "lastErrorObject" : { "n" : 1, "updatedExisting" : true }, "ok" : 1, "writeConcernError" : { "code" : 64, "errInfo" : { "wtimeout" : true }, "errmsg" : "waiting for replication timed out", "codeName" : "WriteConcernFailed" }, "value" : { "fid" : 367585860, "_id" : "5afbf542588399814fe36b5a" } }
The findAndModify result define in mgo seesion.go did not deal with writeConcernErr,in detail:
` type valueResult struct {
}`
The text was updated successfully, but these errors were encountered: