[SERVER-56185] Investigate possible improvements with session migration and a chunk migration's critical section Created: 19/Apr/21  Updated: 29/Oct/23  Resolved: 18/Oct/21

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 5.0.0, 4.2.13, 4.4.5, 4.0.24
Fix Version/s: 5.2.0, 4.4.17, 5.0.11

Type: Improvement Priority: Major - P3
Reporter: Blake Oler Assignee: Allison Easton
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Problem/Incident
causes SERVER-60958 Avoid server hang in chunk migration ... Closed
causes SERVER-72254 Chunk Migration should fail immediate... Backlog
Related
related to SERVER-31347 Remove SessionCatalogMigrationDestina... Closed
related to SERVER-56307 The chunk migration "convergence algo... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v5.3, v5.0, v4.4, v4.2
Sprint: Sharding EMEA 2021-09-20, Sharding EMEA 2021-10-04, Sharding EMEA 2021-10-18, Sharding EMEA 2021-11-01
Participants:
Case:

 Description   

In current MongoDB code, the critical section will be entered regardless of whether the session migration has completed. This makes sense from a correctness standpoint – we must block writes before ensuring that all sessions associated with those writes have been migrated over. However, there exists the question of whether it's possible to coordinate the choice to enter the critical section with specific checkpoints in the critical section. Without such checkpointing, a migration could still take a long time completing the session migration while blocking writes.

An example would be ensuring that all entries that originally existed in the on-disk session catalog when migration started have been copied over before entering the critical section. 

The cost of waiting on session migration checkpointing before entering the critical section is that it would allow more writes to come in, causing transferMods to take longer as well.

This ticket is to investigate the possibility of a middle ground with checkpointing session migrations while not prolonging the length of the migration unnecessarily. Other solutions to this problem are also welcome.



 Comments   
Comment by Githook User [ 08/Aug/22 ]

Author:

{'name': 'Allison Easton', 'email': 'allison.easton@mongodb.com', 'username': 'allisoneaston'}

Message: SERVER-56185 Investigate possible improvements with session migration and a chunk migration's critical section
(cherry picked from commit 6e8bf2cc701d81c11ad3b898cb4c394933034ac3)
Branch: v4.4
https://github.com/mongodb/mongo/commit/c0e5ce18648ccb6356c00db4a5fca05e24a9bfcd

Comment by Githook User [ 26/Jul/22 ]

Author:

{'name': 'Allison Easton', 'email': 'allison.easton@mongodb.com', 'username': 'allisoneaston'}

Message: SERVER-56185 Investigate possible improvements with session migration and a chunk migration's critical section

(cherry picked from commit 6e8bf2cc701d81c11ad3b898cb4c394933034ac3)
Branch: v5.0
https://github.com/mongodb/mongo/commit/977e631b79b0409905729d4bb89137c2bb0f865f

Comment by Githook User [ 15/Oct/21 ]

Author:

{'name': 'Allison Easton', 'email': 'allison.easton@mongodb.com', 'username': 'allisoneaston'}

Message: SERVER-56185 Investigate possible improvements with session migration and a chunk migration's critical section
Branch: master
https://github.com/mongodb/mongo/commit/6e8bf2cc701d81c11ad3b898cb4c394933034ac3

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