[SERVER-49496] Refactor CatalogCache::_scheduleCollectionRefresh function Created: 14/Jul/20  Updated: 22/Jul/20  Resolved: 22/Jul/20

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

Type: Task Priority: Major - P3
Reporter: Tommaso Tocci Assignee: Tommaso Tocci
Resolution: Won't Do Votes: 0
Labels: PM-1645-Milestone-2
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-49292 Futurify CatalogCacheLoader API Closed
Sprint: Sharding 2020-07-13, Sharding 2020-07-27
Participants:

 Description   

The CatalogCache::_scheduleCollectionRefresh logic is implemented using a mix of callbacks and recursion. This makes particularly difficult to follow the execution flow.
Moreover this code is even more difficult to follow because the result forwarded to the callback is handled by an internal function and not from the main callback logic.

Once SERVER-49292 is committed this function should be refactored in order to address the outlined issues.

 



 Comments   
Comment by Tommaso Tocci [ 22/Jul/20 ]

SInce SERVER-46199 is going to change the logic of this function, we decided to move there part of this refactoring and to not do this.

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