[SERVER-74770] Make sure that analyzeShardKey command never inserts a split point document more than once Created: 13/Mar/23  Updated: 29/Oct/23  Resolved: 13/Mar/23

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

Type: Bug Priority: Major - P3
Reporter: Cheahuychou Mao Assignee: Cheahuychou Mao
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding NYC 2023-03-20
Participants:

 Description   

Currently, the analyzeShardKey command doesn't assign an _id to the split point documents that it generates. As a result, if there is a failover during the inserts, some documents can get inserted multiple times due to the auto retry. To solve this, each document must be assigned an _id and DuplicateKey errors should be ignored just like what that's done in the QueryAnalysisWriter.



 Comments   
Comment by Githook User [ 13/Mar/23 ]

Author:

{'name': 'Cheahuychou Mao', 'email': 'mao.cheahuychou@gmail.com', 'username': 'cheahuychou'}

Message: SERVER-74770 Make sure that analyzeShardKey command never insert a split point document more than once
Branch: master
https://github.com/mongodb/mongo/commit/d8e828f669c69c1cd288faf6db3c04b0f88a4bcb

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