[SERVER-27215] Some invariants in MigrationChunkClonerSourceLegacy are not applicable to broadcast multi-update and multi-delete Created: 29/Nov/16  Updated: 05/Apr/17  Resolved: 02/Dec/16

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 3.5.1
Fix Version/s: 3.4.1, 3.5.1

Type: Bug Priority: Major - P3
Reporter: Kaloian Manassiev Assignee: Kaloian Manassiev
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
is related to SERVER-22657 Add invariants and write unit-tests f... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Completed:
Participants:
Linked BF Score: 0

 Description   

The MigrationChunkClonerSourceLegacy code has several invariants to ensure that no document operations are lost during chunk migrations. One is to ensure that no operation is done after the critical section and the other is to ensure that all updates have been transferred to the recipient shard.

Both these invariants assume that all updates are getting blocked while the shard is in a critical section. However, this is not the case for broadcast multi-update and multi-delete which do not contain shard version.



 Comments   
Comment by Githook User [ 05/Dec/16 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-22657,SERVER-27215 Unit-tests for MigrationChunkClonerSourceLegacy

(cherry picked from commit ee84af83abda81bdd5c1fdf2d831c4979d739f8c)
(cherry picked from commit 39c985be5b049edbbb1289eba2bb6f4b44fcb00e)
Branch: v3.4
https://github.com/mongodb/mongo/commit/7ca7bcbfb746ef945afcda91569ea34a2c2738ec

Comment by Githook User [ 02/Dec/16 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-27215 Remove incorrect invariant checks in the chunk cloner source
Branch: master
https://github.com/mongodb/mongo/commit/39c985be5b049edbbb1289eba2bb6f4b44fcb00e

Comment by Kaloian Manassiev [ 29/Nov/16 ]

One option to fix this is to ensure that all updates against a collection, whether they contain shard version or not, get blocked when the collection is under a critical section. This allows us to preserve the invariants as safeguards, but it means that direct writes against a shard would be blocked by the migration critical section.

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