[SERVER-58961] Reduce the overhead from ReshardingDonorWriteRouter on the write codepath Created: 30/Jul/21  Updated: 06/Dec/22  Resolved: 27/Oct/21

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

Type: Task Priority: Major - P3
Reporter: Max Hirschhorn Assignee: [DO NOT USE] Backlog - Sharding NYC
Resolution: Won't Do Votes: 0
Labels: PM-234, PM-234-T-perf
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-58960 Measure the overhead from ShardingWri... Closed
Assigned Teams:
Sharding NYC
Participants:
Story Points: 2

 Description   

Still TBD what can actually be done here and is realistically pending a profile of SERVER-58960. Some thoughts if extracting the shard key value under the new shard key pattern is expensive would be:

  • Extract the shard key value as a KeyString instead of a BSONObj so it doesn't need to be converted afterwards to query the ChunkManager for the new owning ShardId.
  • Extract the current shard key value and new shard key value in a single pass over the BSONObj.
  • (Specific to updates) Cache the current shard key value and new shard key value from what was extracted already in UpdateStage to avoid doing it a second time in OpObserverImpl.

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