[SERVER-47975] Optimize ScopedShardVersionCriticalSection in order to avoid convoy on SSV after a shardVersion change Created: 06/May/20  Updated: 29/Oct/23  Resolved: 26/May/20

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 4.7.0

Type: Task Priority: Major - P3
Reporter: Tommaso Tocci Assignee: Pierlauro Sciarelli
Resolution: Fixed Votes: 0
Labels: PM-1645-Milestone-1
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-47974 Introduce ScopedShardVersionCriticalS... Closed
is depended on by SERVER-45983 Perform the shardVersion recovery and... Closed
is depended on by SERVER-47982 Change the shard version update proce... Closed
is depended on by SERVER-47985 Implement recovery of a shard's `shar... Closed
Duplicate
is duplicated by SERVER-48180 Make onShardVersionMismatch use Scope... Closed
Problem/Incident
causes SERVER-48487 Use DBLock instead of AutoGetDB in on... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2020-05-18, Sharding 2020-06-01
Participants:

 Description   

Optimize ScopedShardVersionCriticalSection class with respect to multi-thread initialization. In particular in the case where a lot of threads try to concurrently instantiate this object.

The idea is to avoid entering in the critical session if it is not strictly needed.

 
Modify onShardVersionMismatch in order to:

Update forceShardFilteringMetadataRefresh:

  • Remove forceRefreshFromThisThread flag
  • Remove unused hasAdditionalCatalogCacheForFiltering part


 Comments   
Comment by Githook User [ 26/May/20 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: SERVER-47975 Optimize ScopedShardVersionCriticalSection in order to avoid convoy on SSV after a shardVersion change
Branch: master
https://github.com/mongodb/mongo/commit/da5f391885ef316e990bb3a13477361c5e2a9dbf

Comment by Githook User [ 26/May/20 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: SERVER-47975 Optimize ScopedShardVersionCriticalSection in order to avoid convoy on SSV after a shardVersion change
Branch: master
https://github.com/mongodb/mongo/commit/da5f391885ef316e990bb3a13477361c5e2a9dbf

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