[SERVER-26370] Race condition allows shard to be chunk donor and recipient at the same time Created: 28/Sep/16  Updated: 19/Nov/16  Resolved: 29/Sep/16

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 3.3.15
Fix Version/s: 3.4.0-rc0

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
Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

Occasionally hit by the bulk_shard_insert.js test.

Sprint: Sharding 2016-10-10
Participants:
Linked BF Score: 0

 Description   

The check for whether a shard is already participating in a migration as either donor or recipient is racy and may allow both to happen at the same time for the same collection.

This should never be allowed to happen because it may lead to a state of the cached shard metadata which is consistent as far as the shard version is concerned, but is missing the received chunk.



 Comments   
Comment by Githook User [ 30/Sep/16 ]

Author:

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

Message: SERVER-26370 Improve error messages returned on moveChunk conflict
Branch: master
https://github.com/mongodb/mongo/commit/d6d5a9081c357df6149c10c296797ffd5339aa3f

Comment by Githook User [ 29/Sep/16 ]

Author:

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

Message: SERVER-26370 Register incoming migrations on the ActiveMigrationsRegistry

In order to avoid race conditions where a shard could serve both as a
donor and recipient.
Branch: master
https://github.com/mongodb/mongo/commit/ba3dc420fe41f9c6ba718da5eb270161374839f3

Comment by Githook User [ 29/Sep/16 ]

Author:

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

Message: SERVER-26370 Cleanup MigrationDestinationManager
Branch: master
https://github.com/mongodb/mongo/commit/b12af9e243b98b50d5918d9afa9354b9935cebf0

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