[SERVER-57177] Create collection coordinator refreshes cached database info only if necessary Created: 25/May/21  Updated: 29/Oct/23  Resolved: 25/May/21

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 5.0.0
Fix Version/s: 5.0.0-rc1, 5.1.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Tommaso Tocci Assignee: Tommaso Tocci
Resolution: Fixed Votes: 0
Labels: PM-1965-Cleanup
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Backwards Compatibility: Fully Compatible
Backport Requested:
v5.0
Sprint: Sharding EMEA 2021-05-31
Participants:

 Description   

In the create collection coordinator we perform an unconditional refresh of the cached database entry, to check if the database has been enabled for sharding. Since changing the "shardingEnabled" flag doesn't imply a database version change we can't rely on the versioning protocol to propagate this changes to the DSS.
Since the flag can only be changed to true but never set back to false afterwards, if the locally chached database entry already has the flag set to true, we can skip the forced refresh.



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 26/May/21 ]

Author:

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

Message: SERVER-57177 Create collection coordinator refreshes cached database info only if necessary

(cherry picked from commit a2241a3126a98222893b9d2a2f7702242f7d3cec)
Branch: v5.0
https://github.com/mongodb/mongo/commit/1d45e5dd7cfb460df05fa13f34175f9e26163f26

Comment by Githook User [ 25/May/21 ]

Author:

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

Message: SERVER-57177 Create collection coordinator refreshes cached database info only if necessary
Branch: master
https://github.com/mongodb/mongo/commit/a2241a3126a98222893b9d2a2f7702242f7d3cec

Comment by Tommaso Tocci [ 25/May/21 ]

Code review: http://mongodbcr.appspot.com/783660010

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