[SERVER-50910] Make ShardRegistry::_getData() async Created: 14/Sep/20 Updated: 29/Oct/23 Resolved: 17/Nov/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 4.9.0-alpha0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Kevin Pulo | Assignee: | Jaume Moragues (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Participants: | |||||||||
| Description |
|
This will eliminate the cumbersome need to use a thread just to schedule a ShardRegistry lookup (when incorporating RSM changes). ie. instead of returning _cache->acquire(...), _getData() can return _cache->acquireAsync(...), and no longer need to take an opCtx (the VectorClock can be obtained via _service instead). Most callers will then just call .get(opCtx) on the result from _getData(). But callers such as the above, which are just scheduling a lookup and aren't interested in the result, don't need to do that. |
| Comments |
| Comment by Githook User [ 17/Nov/20 ] |
|
Author: {'name': 'Jaume Moragues', 'email': 'jaume.moragues@mongodb.com'}Message: |