[SERVER-72829] Ensure Shard Merge supports retryable writes Created: 13/Jan/23  Updated: 29/Oct/23  Resolved: 17/Feb/23

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

Type: Task Priority: Major - P3
Reporter: Christopher Caplinger Assignee: Christopher Caplinger
Resolution: Fixed Votes: 0
Labels: change-streams-support
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-72354 Confirm that all change collection en... Closed
Backwards Compatibility: Fully Compatible
Sprint: Server Serverless 2023-01-23, Server Serverless 2023-02-06, Server Serverless 2023-02-20
Participants:

 Description   

Currently, retryable writes written during oplog catchup are compatible with change streams. Unfortunately, having retryable writes written before the migration starts will cause the migration to fail. The retryable write on the Donor will cause a change collection entry to be generated on the Donor. SERVER-70671 updated the Shard Merge protocol to copy all change collection entries to the Recipient. When we attempt to pre-fetch and apply retryable writes on the Recipient, we attempt to re-create the same change collection entry, which fails with a DuplicateKey error.

We'll need to ensure we're setting tid here, either via entry.getNss().tenantId() or entry.getTid(). Additionally, we should ensure we are setting tid in applyOps entries in the tenant migration recipient service and tenant oplog applier

We should ensure that both retryable writes and retryable FindAndModify work as part of this ticket.



 Comments   
Comment by Githook User [ 16/Feb/23 ]

Author:

{'name': 'Christopher Caplinger', 'email': 'christopher.caplinger@mongodb.com', 'username': 'UnicodeSnowman'}

Message: SERVER-72829: Shard Merge supports retryable writes with Change Streams
Branch: master
https://github.com/mongodb/mongo/commit/b7548b6c10697166a35baf1044049f4c6d06fdd2

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