[SERVER-65083] Thread seeing different set of indices can incorrectly re-use an SBE plan cache entry Created: 30/Mar/22 Updated: 29/Oct/23 Resolved: 20/Apr/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Catalog, Query Planning |
| Affects Version/s: | None |
| Fix Version/s: | 6.0.0-rc2, 6.1.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | David Storch | Assignee: | David Storch |
| 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: |
v6.0
|
||||||||||||||||||||||||
| Sprint: | QE 2022-04-04, QE 2022-04-18, QE 2022-05-02 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Linked BF Score: | 42 | ||||||||||||||||||||||||
| Description |
|
In However, this implementation did not fully ensure the correct behavior of the SBE plan cache when there are concurrent index builds drops. The problem is that readers may not read at a timestamp prior to the completion of an index build. When this occurs, the index catalog code hides the indexes that were not ready at the reader's timestamp. Such readers always see the latest Collection object. This creates a situation where two readers can share a Collection version yet see different views of the index catalog. The consequence is that an SBE plan cache entry can be incorrectly reused and trip a tassert(). Here is a step-by-step description of one possible scenario:
We've also seen the bug manifest in a slightly different way:
|
| Comments |
| Comment by Githook User [ 20/Apr/22 ] |
|
Author: {'name': 'David Storch', 'email': 'david.storch@mongodb.com', 'username': 'dstorch'}Message: (cherry picked from commit 58219cc81297ed4c3a38045c55588fe16d59a53a) |
| Comment by Githook User [ 20/Apr/22 ] |
|
Author: {'name': 'David Storch', 'email': 'david.storch@mongodb.com', 'username': 'dstorch'}Message: |