[SERVER-51215] Pass in original namespace to createTemporaryReshardingCollectionLocally() in order to avoid unnecessary catalog cache retrieval Created: 29/Sep/20  Updated: 06/Dec/22  Resolved: 16/Oct/20

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

Type: Task Priority: Major - P3
Reporter: Blake Oler Assignee: [DO NOT USE] Backlog - Sharding Team
Resolution: Duplicate Votes: 0
Labels: PM-234-M2, PM-234-T-lifecycle, neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-51217 Uncomment createTemporaryReshardingCo... Closed
Related
related to SERVER-50023 Implement temporary resharding collec... Closed
Assigned Teams:
Sharding
Participants:

 Description   

What must be done:

  1. Grab the original namespace from the recipientDocument at this codepoint.
  2. Modify createTemporaryReshardingCollectionLocally() to take in a const NamespaceString&
  3. Use that namespace to replace this block of code.


 Comments   
Comment by Blake Oler [ 09/Oct/20 ]

I forgot at the time of ticket creation that we already have the originalNss in the common resharding metadata available to donors and recipients. This ticket will be to instead pass in the namespace from the recipient document into creating the temporary collection locally, so we don't have to access the catalog cache in order to retrieve it.

Comment by Blake Oler [ 30/Sep/20 ]

In lines 56 through 64 of this code review diff, we retrieve the catalog cache then the resharding fields in order to access the original namespace. The example proposal, and the more general solution, would be that when first seeing reshardingFields during a refresh, we commit to the RecipientDocument any variables necessary, such as the original namespace. This would prevent our having to access the catalog cache every time we want to look up information.

Comment by Max Hirschhorn [ 30/Sep/20 ]

blake.oler, is there some place in the C++ code you could link to and describe what this ticket would make it do differently? I'm not sure I understand what the title or description is really proposing.

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