[SERVER-80699] Chunk migration can incorrectly skip oplog entries written from a mixed-namespace bulkWrite command Created: 01/Sep/23  Updated: 19/Jan/24  Resolved: 19/Jan/24

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

Type: Bug Priority: Major - P3
Reporter: Kaitlin Mahar Assignee: Sean Zimmerman
Resolution: Fixed Votes: 0
Labels: milestone-2
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-80729 Add targeted chunk migration tests fo... Closed
Assigned Teams:
Replication
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Repl 2023-10-16, Repl 2023-10-30, Repl 2023-11-13, Repl 2023-11-27, Repl 2023-12-11, Repl 2023-12-25, Repl 2024-01-08, Repl 2024-01-22
Participants:

 Description   

Currently there is an optimization in the chunk migration code where if the source sees that an oplog entry for a session has a different namespace than the one being migrated, it skips inspecting the rest of the oplog chain, with the assumption that all entries in the chain will be for a single namespace.

Unfortunately that assumption no longer holds up for bulkWrite since a single retryable write can now touch multiple namespaces. And so if for example we have an oplog chain (from newest to oldest) generated from a single retryable bulkWrite with:

  1. write to coll1
  2. write to coll2

And we are migrating coll2, we would see that the first entry is on a different ns and skip the rest of the chain.



 Comments   
Comment by Githook User [ 19/Jan/24 ]

Author:

{'name': 'seanzimm', 'email': '102551488+seanzimm@users.noreply.github.com', 'username': 'seanzimm'}

Message: SERVER-80699: Fix Chunk Migrations Optimization for bulkWrite (#16134)

GitOrigin-RevId: 0dea85bbb35079a795b4e1d4845e9527849a4b87
Branch: master
https://github.com/mongodb/mongo/commit/a65d5122c87dd316ae06b497f7044b9647574bc7

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