[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:
Depends
depends on SERVER-55412 Mirrored reads should propagate the s... Closed
Related
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 SERVER-55412 ensures shardVersion is propagated to secondaries with mirrored operations. BACKPORT-10175 and BACKPORT-10176 apply the fix to v5.0 and v4.4 branches, respectively.

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.

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