[SERVER-47953] Improve performance of cached collection refresh during cache warming Created: 05/May/20 Updated: 06/Dec/22 Resolved: 02/Aug/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Dmitry Agranat | Assignee: | Backlog - Service Architecture |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Assigned Teams: |
Service Arch
|
||||||||||||
| Operating System: | ALL | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
After a data node steps up as primary as part of a priority takeover, it starts doing a cached collection refresh. During this time all write operations to this collection are blocked until it completes. |
| Comments |
| Comment by Amirsaman Memaripour [ 02/Aug/21 ] |
|
Closing this ticket as "Done" since |
| Comment by Sergi Mateo Bellido [ 22/Mar/21 ] |
|
We finally found why mirrored reads didn't help to warm the routing info: mirrored reads do not propagate the shard version when mirroring the command to the secondary nodes. Due to the lack of the shard version, mirrored find commands (similarly for other cmds) don't have the INCLUDE_SHARD_FILTER query phase, which is the phase that ends up refreshing the routing table. This issue is also present on master. For the sake of completeness: if they have used hedged reads instead of mirrored reads in HELP-15484, the cache would have been refreshed. hedged reads forward the same command to secondaries, thus, the shard version would have been there. |
| Comment by Kaloian Manassiev [ 13/May/20 ] |
|
The routing info cache will be kept warmed-up starting in 4.4 though thee use of mirrored reads. Outside of this, there is not much that can be done for a node which is just starting up and has its cache cold. |