[SERVER-59832] Prevent writes to orphan documents Created: 08/Sep/21  Updated: 29/Oct/23  Resolved: 10/Dec/21

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

Type: Task Priority: Major - P3
Reporter: Sergi Mateo Bellido Assignee: Antonio Fuschetto
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
Backwards Compatibility: Fully Compatible
Sprint: Sharding EMEA 2021-09-06, Sharding EMEA 2021-09-20, Sharding EMEA 2021-10-04, Sharding EMEA 2021-10-18, Sharding EMEA 2021-11-01, Sharding EMEA 2021-11-15, Sharding EMEA 2021-11-29, Sharding EMEA 2021-12-13
Participants:
Linked BF Score: 100

 Description   

(UPDATE)

This ticket is about preventing writes on orphan documents of update/delete operations that go through a mongos (i.e. the common case). We have a separate ticket to prevent direct update/delete operations to shards affecting orphan documents (SERVER-61847).

Initially we thought about just doing orphan filtering when needed (i.e. trying to identify in which scenarios the shard versioning protocol provides enough guarantees), but in one of the projects reviews we agreed on doing it for all update/delete ops.


Right now there are only two scenarios in which this could happen and in both cases we are not attaching a valid shard version to the command:

  • Broadcast writes (if I recall correctly, we are currently attaching ChunkVersion::IGNORED())
  • Direct writes to a shard without going through mongosĀ  (SERVER-61847)


 Comments   
Comment by Githook User [ 10/Dec/21 ]

Author:

{'name': 'Antonio Fuschetto', 'email': 'antonio.fuschetto@mongodb.com', 'username': 'afuschetto'}

Message: SERVER-59832 Prevent writes to orphan documents
Branch: master
https://github.com/mongodb/mongo/commit/d5d59422cf63d847fc8aa52e922174e2fdad3ed3

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