[SERVER-70864] Get rid of fine grained scoped range deleter lock Created: 26/Oct/22  Updated: 29/Oct/23  Resolved: 01/Nov/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 6.1.0, 6.0.2
Fix Version/s: 6.1.1, 6.0.3, 6.2.0-rc0

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

Issue Links:
Backports
Duplicate
is duplicated by SERVER-70322 BalancerStatsRegistry inappropriately... Closed
is duplicated by SERVER-70340 Range deleter can cause migration loc... Closed
is duplicated by SERVER-70408 Migrations for collection undergoing ... Closed
Related
is related to SERVER-70888 ScopedRangeDeleterLock might lead to ... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v6.1, v6.0
Sprint: Sharding EMEA 2022-10-31, Sharding EMEA 2022-11-14
Participants:

 Description   

Purpose of this ticket is to simplify the scoped range deleter lock in order to solve all in once the problems listed in SERVER-70322, SERVER-70340 and SERVER-70408.

The idea is to get rid of the fine grained locking because it has provoked more race conditions than advantages and because using it does not result in relevant performance improvements.

We could provide a simple global scoped range deleter lock to be taken in different modes depending on the context.

  • Initializing balancer stats registry: MODE_S
  • Initializing range deleter service: MODE_S
  • Updating the number of orphans: MODE_IX

Only v6.1+ versions (to synchronize with range deleter service initialization)

  • Creating a new range deletion task document MODE_IX
  • Unsetting the pending field MODE_IX

Only v6.0+ versions (to synchronize with upgrade/downgrade)

  • Setting the number of orphans on upgrade MODE_X
  • Unsetting the number of orphans on downgrade MODE_X


 Comments   
Comment by Githook User [ 01/Nov/22 ]

Author:

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

Message: SERVER-70864 Get rid of fine-grained range deleter lock

(cherry picked from commit 9cad5aec81a4d40a5d61fe8e63ddc02c869b1a12)
Branch: v6.1
https://github.com/mongodb/mongo/commit/a4c2c33a3154c86ec245556f1122091f87d407de

Comment by Githook User [ 01/Nov/22 ]

Author:

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

Message: SERVER-70864 Get rid of fine-grained range deleter lock

(cherry picked from commit 5fc0b006e4362f80a449dffb2a5ff0039d80817b)
Branch: v6.0
https://github.com/mongodb/mongo/commit/4645125b6cf7effd4788a543cf7f8acdc8fded13

Comment by Githook User [ 01/Nov/22 ]

Author:

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

Message: SERVER-70864 Get rid of fine-grained range deleter lock
Branch: master
https://github.com/mongodb/mongo/commit/9cad5aec81a4d40a5d61fe8e63ddc02c869b1a12

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