[SERVER-28447] Migration critical section for one collection will block finds for any other sharded collection Created: 23/Mar/17  Updated: 06/Dec/17  Resolved: 06/Apr/17

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 3.2.12
Fix Version/s: 3.2.13

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
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2017-04-17
Participants:

 Description   

The find command implementation in 3.2 indiscriminately checks for critical section before even looking at the collection's shard version. This causes the migration critical section on one collection to stall find operations for all other collections even if they do not participate in migrations themselves.

Since in 3.2 there isn't a (non-racy) way to differentiate between the critical sections on one collection versus another, at the very least this check should only be done if shard version mismatch is encountered and not all the time.



 Comments   
Comment by Ramon Fernandez Marina [ 24/Aug/17 ]

Author:

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

Message:SERVER-28447 Forward-port migration_critical_section_concurrency.js

This test ensures that while query and write on one collection are stuck in the migration critical section, other collections are not impacted.
Branch:master
https://github.com/mongodb/mongo/commit/dca347ebe473a36116157d3649bd10b3319794fc

Comment by Ramon Fernandez Marina [ 24/Aug/17 ]

Author:

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

Message:Revert "SERVER-28447 Forward-port migration_critical_section_concurrency.js"

This reverts commit dca347ebe473a36116157d3649bd10b3319794fc.
Branch:master
https://github.com/mongodb/mongo/commit/50474a3282dbda452d91754e07d6fed5f3f8ccab

Comment by Githook User [ 07/Apr/17 ]

Author:

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

Message: SERVER-28447 Disable migration_critical_section_concurrency.js in 3.2 last stable suite

The last-stable 3.2 is 3.2.12 which does not yet have the fix.
Branch: v3.4
https://github.com/mongodb/mongo/commit/1b175e16b74c263b1472c56a235725062bf949c0

Comment by Githook User [ 07/Apr/17 ]

Author:

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

Message: SERVER-28447 Use the correct failpoint in migration_critical_section_concurrency.js on master
Branch: master
https://github.com/mongodb/mongo/commit/d82a86cbf95c0e09271e92a115b4528dac170fdb

Comment by Githook User [ 07/Apr/17 ]

Author:

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

Message: SERVER-28447 Forward-port migration_critical_section_concurrency.js

This test ensures that while query and write on one collection are stuck
in the migration critical section, other collections are not impacted.
Branch: v3.4
https://github.com/mongodb/mongo/commit/2d22e8bf64e97a2b1ef6f755fe3aebaee474e677

Comment by Githook User [ 07/Apr/17 ]

Author:

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

Message: SERVER-28447 Forward-port migration_critical_section_concurrency.js

This test ensures that while query and write on one collection are stuck
in the migration critical section, other collections are not impacted.
Branch: master
https://github.com/mongodb/mongo/commit/c48f2983e1a525394449fd2f2f1323b964bc8968

Comment by Githook User [ 06/Apr/17 ]

Author:

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

Message: SERVER-28447/SERVER-28448 Only refresh metadata or wait for critical section on StaleConfigException
Branch: v3.2
https://github.com/mongodb/mongo/commit/5a5098ea760396adbb9b096bed6c30357ab3cacd

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