[SERVER-22960] find command checks for shard version outside of collection lock Created: 04/Mar/16 Updated: 14/Apr/16 Resolved: 04/Mar/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Kaloian Manassiev | Assignee: | Kaloian Manassiev |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Operating System: | ALL |
| Participants: |
| Description |
|
The implementation of find command on mongod checks the shard version outside of collection lock. This means that the collection might change after it has been checked, but before the command actually starts returning results and thus it may return results, which do not belong to the shard being queried. This should be easy to fix by moving the collection lock up. |
| Comments |
| Comment by Kaloian Manassiev [ 04/Mar/16 ] |
|
The check for shard version is actually further down this code path, so no checking is happening outside of a lock. |