[SERVER-69768] Include key pattern in range deletion task documents Created: 16/Sep/22  Updated: 29/Oct/23  Resolved: 22/Sep/22

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

Type: Task Priority: Major - P3
Reporter: Pierlauro Sciarelli Assignee: Silvia Surroca
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-47025 moveChunk after refine shard key can ... Closed
is depended on by SERVER-69769 Add `keyPattern` to all range deletio... Backlog
Related
is related to SERVER-69792 Mandatory `keyPattern` fields for ran... Blocked
Backwards Compatibility: Fully Compatible
Sprint: Sharding EMEA 2022-09-19, Sharding EMEA 2022-10-03
Participants:

 Description   

In order to avoid the range deleter having to look into sharding metadata to discover the key pattern, add it as a field on range deletion task documents.

The purpose of this ticket is to:

  • Add a new keyPattern field to the IDL (optional)
  • Write down the key pattern in all newly created range deletion documents


 Comments   
Comment by Githook User [ 21/Sep/22 ]

Author:

{'name': 'Silvia Surroca', 'email': 'silvia.surroca@mongodb.com', 'username': 'silviasuhu'}

Message: SERVER-69768 Include key pattern in range deletion task documents
Branch: master
https://github.com/mongodb/mongo/commit/1d61d0b76ec6b6c130d6d2433d56df5524a7a82c

Comment by Pierlauro Sciarelli [ 16/Sep/22 ]

It should be ok to keep the old key pattern for orphaned ranges created before refining: given that it will be a prefix of the current shard key pattern, calling findShardKeyPrefixedIndex with the old key pattern would still return the right index for deleting the range.

Comment by Max Hirschhorn [ 16/Sep/22 ]

Will a shard refreshing as a result of a refineCollectionShardKey operation update the key pattern cached in the range deletion task documents?

Generated at Thu Feb 08 06:14:20 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.