[SERVER-77332] Reevaulate migration destination session usage Created: 19/May/23  Updated: 12/Dec/23

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Randolph Tan Assignee: Backlog - Cluster Scalability
Resolution: Unresolved Votes: 0
Labels: ShardingTechDebt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-76720 Chunk Migration migrates the session ... Closed
Assigned Teams:
Cluster Scalability
Participants:

 Description   

The session is checked out at the beginning and we "yield" from time to time (example) during the course of the migration. The main purpose of this session + txnNumber is to prevent older primaries from running the _migrateClone on the destination. However, it also had run into issues (for ex, SERVER-76720) because the session is held for almost the entire duration.

Some ideas:
1. Perhaps make migration destination manager a primary only service + possibly additional checks to prevent old instances trying to rerun migrateClone and possibly trigger range deleter on non-orphaned data.
2. Keep the session + txnNumber but only hold it at the very beginning when checking if it is allowed to continue running. This way we can also get rid of the "yielding" code and won't have to worry about not forgetting to yield when adding new blocking code.


Generated at Thu Feb 08 06:35:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.