[SERVER-41041] ViewCatalog should actively reload after changes Created: 07/May/19 Updated: 29/Oct/23 Resolved: 15/Jul/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Storage |
| Affects Version/s: | None |
| Fix Version/s: | 4.2.0-rc3, 4.3.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Xiangyu Yao (Inactive) | Assignee: | Gregory Wlodarek |
| 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 | ||||||||||||||||||||||||||||
| Backport Requested: |
v4.2
|
||||||||||||||||||||||||||||
| Steps To Reproduce: | Just increase the number of iterations:
and then run
|
||||||||||||||||||||||||||||
| Sprint: | Execution Team 2019-06-03, Execution Team 2019-06-17, Execution Team 2019-07-15 | ||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||
| Linked BF Score: | 15 | ||||||||||||||||||||||||||||
| Description |
|
Currently any changes made to ViewCatalog or system.views collection only mark view catalog as invalid and it will lazily reload when later used. However, lazy reload may read outdated data from system.views and thus load wrong version of view catalog. To fix this problem, we should always actively reload the view catalog by changing invalidate() function to an active reload function. We also need to set minVisibleSnapshot on the view catalog when reload. Any operations to view catalog will get a writeConflictException if it's behind the minVisibleSnapshot and then retry with a more up-to-date snapshot. |
| Comments |
| Comment by Githook User [ 13/Oct/20 ] |
|
Author: {'name': 'Henrik Edin', 'email': 'henrik.edin@mongodb.com', 'username': 'henrikedin'}Message: They are not needed after the work in |
| Comment by Githook User [ 17/Jul/19 ] |
|
Author: {'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}Message: (cherry picked from commit 71fced4ef1bdbc1e5b517057eb15be256eaf0ba7) |
| Comment by Githook User [ 15/Jul/19 ] |
|
Author: {'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}Message: |