[SERVER-67686] collMod coordinator must block migration on bucket nss (2nd attempt) Created: 30/Jun/22  Updated: 29/Oct/23  Resolved: 25/Jul/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 6.0.0-rc12
Fix Version/s: 6.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Tommaso Tocci Assignee: Tommaso Tocci
Resolution: Fixed Votes: 0
Labels: shardingemea-qw
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
causes SERVER-69038 CollMod coordinator V3 does not seria... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding EMEA 2022-07-11, Sharding EMEA 2022-07-25, Sharding EMEA 2022-08-08
Participants:
Story Points: 5

 Description   

Currently the collMod coordinator blocks and resume migrations as part of its coordination.

In case of sharded timeseries collection we should block migrations on the bucket namespace rather than the view namespace associated with the timeseries collection

In SERVER-67399 I tried to fix this by just blocking migrations on the targeting namespace.
Unfortunately I needed to revert the simple fix because I discovered that the kBlockShards phase   of the collMod cooridnator is not idempotent because it performs the following steps:

  1. blocks migrations for the specific collection
  2. acquire the collection critical section on all participant shard.

In case we already performed 2. we can't re-execute 1. because stopping migrations will serialize with the collection critical section taken by 2.

In fact as part of blocking migrations we send a {_flushRoutingTableCacheUpdates} to all the shards that in turn blocks behind the acquired critical section



 Comments   
Comment by Githook User [ 25/Jul/22 ]

Author:

{'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}

Message: SERVER-67686 collMod coordinator must block migration on bucket nss (2nd attempt)
Branch: master
https://github.com/mongodb/mongo/commit/1b4355473c026de8d49692ac32250bca0381c918

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