[SERVER-56188] Nested applyOps can hold onto global X lock while blocking on migration commit/abort. Created: 19/Apr/21  Updated: 29/Oct/23  Resolved: 29/Apr/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.9.0-rc1, 5.0.0-rc0

Type: Bug Priority: Major - P3
Reporter: Jason Chan Assignee: Jason Zhang
Resolution: Fixed Votes: 0
Labels: pm-1791_non-cloud-blocking, pm-1791_other_required
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Related
related to SERVER-51753 Handle applyOps during tenant migrations Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.9
Sprint: Sharding 2021-05-03
Participants:
Linked BF Score: 135

 Description   

The applyOps command will acquire the global lock in X mode and then apply the nested applyOps object, which will recursively call into applyOps(). While holding the global X lock, the applyOps command can hit a tenantMigrationConflict and wait for migration commit/abort without yielding the lock.



 Comments   
Comment by Githook User [ 05/May/21 ]

Author:

{'name': 'Jason Zhang', 'email': 'jason.zhang@mongodb.com', 'username': 'jz1242'}

Message: SERVER-56188 Nested applyOps can hold onto global X lock while blocking on migration commit/abort

(cherry picked from commit 51bef6c2d9d035afed3735ea107d1e7b58392d93)
Branch: v4.9
https://github.com/mongodb/mongo/commit/37f81b4c719197a59dca0f462d9bb658d494b309

Comment by Githook User [ 29/Apr/21 ]

Author:

{'name': 'Jason Zhang', 'email': 'jason.zhang@mongodb.com', 'username': 'jz1242'}

Message: SERVER-56188 Nested applyOps can hold onto global X lock while blocking on migration commit/abort
Branch: master
https://github.com/mongodb/mongo/commit/51bef6c2d9d035afed3735ea107d1e7b58392d93

Comment by Lingzhi Deng [ 19/Apr/21 ]

Thanks Jason for the nice catch. cheahuychou.mao jack.mulrow, this seems related to SERVER-51753 when there is a nested applyOps. Just curious, do we need to support applyOps for tenant migration?

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