[SERVER-20634] Mongo 3.0.5 might lose update operation on record if update operations occur during shard data migration Created: 25/Sep/15 Updated: 10/Nov/15 Resolved: 10/Nov/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 3.0.5 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | Lucifinil Long | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | sharding | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
A mongos manages two shards, version 3.0.5. Replica set consist of 3 mongod instances, one of them is arbiter. Both mongod instances started with --storageEngine wiredTiger parameter. |
||
| Issue Links: |
|
||||||||
| Operating System: | Linux | ||||||||
| Steps To Reproduce: | Use below command to update record with about 50000 requests per second: , update: {$inc: {latest:2}, $set:{latest_modified:new Date()}}, new: true } |
||||||||
| Participants: | |||||||||
| Description |
|
Hi, guys We’re using a mongos instance that manages 2 shards with Mongo version 2.4.3 as our DB server. There is a collection ‘latest_id’ in db ‘msg_id’ on mongos, shard key is ‘jid’ field with hash index, and there is a unique index on ‘jid’ field also.
It works fine most time, however, we have encountered an issue during pressure test: A successful update operation on “latest” field has lost!
Above two lines show that two findAndModify operation were successful and new data have been returned, however, from mongo shell, the data is below:
Therefore, I also checked the data change history from local db in shards:
/usr/local/mongodb30/bin/mongo localhost:6316/local
From above change history, we can see that the record has been copied from replica set “rep19” to “rep9” at Timestamp(1442817354, 1379); then a new update operation still has occurred on replica set “rep19” at Timestamp(1442817380, 631); finally, replica set “rep19” performed a delete operation at Timestamp(1442817391, 1797) to delete the updated record. |
| Comments |
| Comment by Ramon Fernandez Marina [ 10/Nov/15 ] |
|
lucifinil, as you can see in Regards, |
| Comment by Lucifinil Long [ 10/Nov/15 ] |
|
Hi, Ramon Fernandez |
| Comment by Ramon Fernandez Marina [ 22/Oct/15 ] |
|
lucifinil, apologies for the delay in getting back to you. You may be running into |
| Comment by Lucifinil Long [ 10/Oct/15 ] |
|
More information: I did not set any write concern for db during I was deploying the Mongo environment. |
| Comment by Lucifinil Long [ 09/Oct/15 ] |
|
Hi, Ramon Fernandez You can send email to longjun@360.cn if need, I will response it as soon as possible. Thanks a lot. |
| Comment by Ramon Fernandez Marina [ 25/Sep/15 ] |
|
lucifinil, the description above reads:
and then:
Can you please clarify which exact versions of mongod and mongos are you running on each node? Thanks, |