[SERVER-63328] Relax checks for write lock to support spilling to temp WT record store on secondaries Created: 05/Feb/22 Updated: 29/Oct/23 Resolved: 17/Feb/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.0.0-rc0, 5.2.2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Ian Boros | Assignee: | Eric Cox (Inactive) |
| Resolution: | Fixed | Votes: | 1 |
| 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: |
v5.2
|
||||||||
| Sprint: | QE 2022-02-21 | ||||||||
| Participants: | |||||||||
| Case: | (copied to CRM) | ||||||||
| Description |
|
Repro:
In the SBE HashAgg stage, we take a global IX lock before spilling to disk. This will cause the wasGlobalLockTakenForWrite() function to return true at the end of command processing, and we will end up calling waitForWriteConcern here, even if the operation only wrote to a local temporary RecordStore for spilling. As Max H as pointed out, the SpillableCache used in window functions likely suffers the same issue, since it also takes an IX lock here. The user facing impact of this is that $group queries which spill, when run on secondaries with a writeConcern stronger than w:1 are broken. |
| Comments |
| Comment by Githook User [ 17/Feb/22 ] |
|
Author: {'name': 'Eric Cox', 'email': 'eric.cox@mongodb.com', 'username': 'ericox'}Message: (cherry picked from commit 69f2f33c4c9edcceb013e16e6b6d737a20b481b3) |
| Comment by Githook User [ 16/Feb/22 ] |
|
Author: {'name': 'Eric Cox', 'email': 'eric.cox@mongodb.com', 'username': 'ericox'}Message: |