[SERVER-47445] Scope can forget to load system.js procedures if interrupted Created: 09/Apr/20 Updated: 29/Oct/23 Resolved: 17/Apr/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 4.5.1 |
| Fix Version/s: | 4.4.0-rc2, 4.7.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | David Percy | Assignee: | David Percy |
| 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.4
|
||||||||||||||||||||
| Sprint: | Query 2020-04-20, Query 2020-05-04 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Linked BF Score: | 32 | ||||||||||||||||||||
| Description |
|
When you tell a Scope instance to load procedures from system.js, it uses a version number to decide whether the contents of system.js are unchanged. When the version number matches, it does nothing; when the version number is different, it does the actual work of loading stored procedures. The problem is, the Scope instance updates its version number before doing the work, so if an exception happens during the work, the Scope thinks it's up to date when it's not. To fix it we can move this line to the bottom of the function: https://github.com/mongodb/mongo/blob/master/src/mongo/scripting/engine.cpp#L227 |
| Comments |
| Comment by Githook User [ 20/Apr/20 ] |
|
Author: {'name': 'David Percy', 'email': 'david.percy@mongodb.com', 'username': 'dpercy'}Message: |
| Comment by Githook User [ 17/Apr/20 ] |
|
Author: {'name': 'David Percy', 'email': 'david.percy@mongodb.com', 'username': 'dpercy'}Message: |