[SERVER-68694] The compact command should not block oplog application Created: 09/Aug/22  Updated: 29/Oct/23  Resolved: 10/Aug/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.4.17, 5.0.12, 6.0.2, 6.1.0-rc0

Type: Task Priority: Major - P3
Reporter: Gregory Wlodarek Assignee: Gregory Wlodarek
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Duplicate
is duplicated by SERVER-63973 Investigate compact not holding the P... Closed
Problem/Incident
Related
is related to SERVER-16413 Storage engines that allow online com... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v6.0, v5.0, v4.4
Sprint: Execution Team 2022-08-22
Participants:
Case:
Linked BF Score: 135

 Description   

We first take the collection exclusive lock and downgrade it to an intent lock if the storage engine supports online compaction. We should reverse the order of this as it reports confusing FTDC metrics. Start with the intent lock and upgrade to an exclusive lock if online compaction is not supported.

I also don't think the compact command should take the PBWM lock as the command is internal to the storage engine and should not block oplog application.



 Comments   
Comment by Githook User [ 03/Sep/22 ]

Author:

{'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}

Message: SERVER-68694 The compact command should not block oplog application

(cherry picked from commit 10e65755f6a20afdedab57736d1b1648232a6194)
Branch: v4.4
https://github.com/mongodb/mongo/commit/8cbbc048c56edfa585819dd81b8405f08e6ab9cc

Comment by Githook User [ 03/Sep/22 ]

Author:

{'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}

Message: SERVER-68694 Reverse the compact commands locking order

(cherry picked from commit 4b8e1a96fce58426630f3d46170cf2c3a614c087)
Branch: v4.4
https://github.com/mongodb/mongo/commit/3121581e4dc582646f791fc62ee35f8c75a304d8

Comment by Githook User [ 23/Aug/22 ]

Author:

{'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}

Message: SERVER-68694 The compact command should not block oplog application

(cherry picked from commit 10e65755f6a20afdedab57736d1b1648232a6194)
Branch: v6.0
https://github.com/mongodb/mongo/commit/fc231f2e56459d00e82d804b3d1d8fde55051eb8

Comment by Githook User [ 23/Aug/22 ]

Author:

{'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}

Message: SERVER-68694 Reverse the compact commands locking order

(cherry picked from commit 4b8e1a96fce58426630f3d46170cf2c3a614c087)
Branch: v6.0
https://github.com/mongodb/mongo/commit/84d18ba8a0aa7b26c2d26082dd8536d89d4e37b8

Comment by Githook User [ 23/Aug/22 ]

Author:

{'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}

Message: SERVER-68694 The compact command should not block oplog application

(cherry picked from commit 10e65755f6a20afdedab57736d1b1648232a6194)
Branch: v5.0
https://github.com/mongodb/mongo/commit/590a646c81390f8877aa761d98d5d1ffd442ecfa

Comment by Githook User [ 23/Aug/22 ]

Author:

{'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}

Message: SERVER-68694 Reverse the compact commands locking order

(cherry picked from commit 4b8e1a96fce58426630f3d46170cf2c3a614c087)
Branch: v5.0
https://github.com/mongodb/mongo/commit/b646a5bade5c0b8e558b81f025b7c0f5c3bc783f

Comment by Githook User [ 10/Aug/22 ]

Author:

{'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}

Message: SERVER-68694 The compact command should not block oplog application
Branch: master
https://github.com/mongodb/mongo/commit/10e65755f6a20afdedab57736d1b1648232a6194

Comment by Githook User [ 10/Aug/22 ]

Author:

{'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}

Message: SERVER-68694 Reverse the compact commands locking order
Branch: master
https://github.com/mongodb/mongo/commit/4b8e1a96fce58426630f3d46170cf2c3a614c087

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