[JAVA-1287] WriteResult.isUpdateOfExisting reports wrong value running against MongoDB 2.6 Created: 20/Jun/14  Updated: 30/Jan/15  Resolved: 24/Jun/14

Status: Closed
Project: Java Driver
Component/s: Write Operations
Affects Version/s: 2.12.0
Fix Version/s: 2.12.3, 3.0.0

Type: Bug Priority: Major - P3
Reporter: Jeffrey Yemin Assignee: Jeffrey Yemin
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Running against MongoDB 2.6, WriteResult.isUpdateOfExisting reports wrong value for an update that does not modify any documents. While it does report n = 0, it reports updateOfExisting = true, and it should be false.



 Comments   
Comment by Githook User [ 30/Jan/15 ]

Author:

{u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

Message: JAVA-1287: WriteResult.isUpdateExisting was already set correctly, but simplified the code and added tests to match the 2.12.x branch
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/7f967abe185976241733e66299f008d75b128c3e

Comment by Githook User [ 01/Aug/14 ]

Author:

{u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

Message: JAVA-1287: Set WriteResult.updateOfExisting based only on BulkWriteResult.matchedCount
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/ecaac842109c84b966d021ffc25bf93ab9c10c96

Comment by Githook User [ 24/Jun/14 ]

Author:

{u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

Message: JAVA-1287: WriteResult.isUpdateExisting was already set correctly, but simplified the code and added tests to match the 2.12.x branch
Branch: 3.0.x
https://github.com/mongodb/mongo-java-driver/commit/7f967abe185976241733e66299f008d75b128c3e

Comment by Jeffrey Yemin [ 21/Jun/14 ]

Pushed to 2.12.x, need to port to 3.0.x

Comment by Githook User [ 21/Jun/14 ]

Author:

{u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

Message: JAVA-1287: Set WriteResult.updateOfExisting based only on BulkWriteResult.matchedCount
Branch: 2.12.x
https://github.com/mongodb/mongo-java-driver/commit/ecaac842109c84b966d021ffc25bf93ab9c10c96

Generated at Thu Feb 08 08:54:14 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.