[SERVER-54889] Nested LFR collection helpers must not try to re-establish read source Created: 02/Mar/21 Updated: 29/Oct/23 Resolved: 24/Mar/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Storage |
| Affects Version/s: | None |
| Fix Version/s: | 4.9.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Dianna Hohensee (Inactive) | Assignee: | Dianna Hohensee (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 | ||||||||||||||||
| Backport Requested: |
v4.9
|
||||||||||||||||
| Sprint: | Execution Team 2021-03-22, Execution Team 2021-04-05 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 122 | ||||||||||||||||
| Description |
|
TLDR; we still run the read source selection code in nested lock-free collection helpers. That read source selection may attempt to open a snapshot via RecoveryUnit::setTimestampReadSource(), which invariants if a snapshot is already open. We must not try to re-establish the read source. We already have a matching in-mem and on-disk snapshot at that point and should just run with it, disregarding repl state changes. SBE has multiple AutoGetColl*LockFree instances in play. I think we opened a snapshot in one AutoGet*LockFree in mode secondary, stepped up to PRIMARY, and then in a subsequent AutoGet*LockFree this code to select read source ran a second time returning a different result and provoked another setTimestampReadSource() request that invariant'ed on an already open snapshot. I think our problem is that nested AutoGet*LockFree still run the establish read source logic repeatedly along with the Collection fetch. |
| Comments |
| Comment by Githook User [ 24/Mar/21 ] |
|
Author: {'name': 'Dianna Hohensee', 'email': 'dianna.hohensee@mongodb.com', 'username': 'DiannaHohensee'}Message: |
| Comment by David Storch [ 03/Mar/21 ] |
|
dianna.hohensee while working
|