[SERVER-39971] findAndModify in sharded transactions and readConcern “majority” miss existing record Created: 05/Mar/19 Updated: 27/Oct/23 Resolved: 11/Apr/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Asya Kamsky | Assignee: | Asya Kamsky |
| Resolution: | Gone away | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Participants: | |||||||||
| Description |
|
I created a sharded cluster with 1 mongos, 1 config server and three shards each with a single node replica set. I pre-load the data and the contended table in question has this index:
in addition to _id index. The collection is sharded with shard key
The following two contended operations start majority of transactions:
With readConcern “majority” every once in a while one of these two findAndModify commands matches 0 documents, which is impossible.
There are no inserts, deletes or balancing happening to this collection, only lots of findAndModify and a very occasional find. |
| Comments |
| Comment by Asya Kamsky [ 11/Apr/19 ] | |||
|
Gone away as a result of | |||
| Comment by Kaloian Manassiev [ 01/Apr/19 ] | |||
|
Oh I wasn't sure if 4.1.9 is out yet or not, that's why I said latest nightly. We can close it then, thanks Asya. | |||
| Comment by Asya Kamsky [ 01/Apr/19 ] | |||
|
I tried with 4.1.9 and I couldn’t. Should I try again with nightly? I assumed that the previously suspected issue that was fixed in 4.1.9 was it. | |||
| Comment by Kaloian Manassiev [ 01/Apr/19 ] | |||
|
asya, can you try to reproduce this on the latest nightly build? | |||
| Comment by Asya Kamsky [ 14/Mar/19 ] | |||
|
It looks like that’s fixed in 4.1.9 - once that’s out I can try to reproduce and if I cannot then can close this resolved as duplicate. | |||
| Comment by Tess Avitabile (Inactive) [ 08/Mar/19 ] | |||
|
This could be related to | |||
| Comment by Asya Kamsky [ 05/Mar/19 ] | |||
|
Here are some typical log lines:
|