[SERVER-85526] Modify ResourceYielder of MultiStatementTransactionRequestsSender for shards Created: 22/Jan/24 Updated: 06/Feb/24 |
|
| Status: | In Code Review |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Jordi Olivares Provencio | Assignee: | Jordi Olivares Provencio |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Sprint: | CAR Team 2024-01-22, CAR Team 2024-02-05, CAR Team 2024-02-19 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Description |
|
During a $lookup pipeline construction we first attempt to build a pipeline using local information. If we fail to do so we assume we'll have to contact a remote shard. Doing so ends up calling MultiStatementTransactionRequestsSender via CursorEstablisher. However, in case we're inside a multi-document transaction we aren't releasing the checked out session on the originating shard. As a result, we'd end up deadlocking the operation if the collection exists on the originating shard again as they could end up contacting themselves and waiting for a checked out session. |
| Comments |
| Comment by Jordi Olivares Provencio [ 02/Feb/24 ] |
|
Blocking merge until SERVER-86160 is done since we'll build on top of it. |