[SERVER-40647] ViewCatalog::iterate should use _reloadIfNeeded rather than _requireValidCatalog Created: 15/Apr/19 Updated: 29/Oct/23 Resolved: 16/Apr/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Storage |
| Affects Version/s: | None |
| Fix Version/s: | 4.1.11 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Xiangyu Yao (Inactive) | Assignee: | Xiangyu Yao (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
|||||
| Backwards Compatibility: | Fully Compatible | |||||
| Operating System: | ALL | |||||
| Steps To Reproduce: | Increase the window between _reloadIfNeeded and _valid:
resmoke.py --suites concurrency --numClientsPerFixture 20 jstests/concurrency/fsm_workloads/view_catalog_direct_system_writes.js |
|||||
| Sprint: | Storage NYC 2019-04-22 | |||||
| Participants: | ||||||
| Linked BF Score: | 20 | |||||
| Description |
|
When listCollections() calls viewCatalog::iterate, it's possible that there is a concurrent modification to "system.views" collection which invalidates the viewCatalog between viewCatalog's reload and invariant for _valid. This function (and its invariant) is still meaningful for viewCatalog::create/update/drop because the collection lock should prevent such concurrent modification to "system.views". However, ViewCatalog::iterate does not have those locks so it shouldn't invariant that _valid is true after reload. |
| Comments |
| Comment by Githook User [ 16/Apr/19 ] |
|
Author: {'name': 'Xiangyu Yao', 'username': 'xy24', 'email': 'xiangyu.yao@mongodb.com'}Message: |