[SERVER-17255] Don't lock MODE_X for compact() operation Created: 11/Feb/15  Updated: 25/Jun/15  Resolved: 22/Jun/15

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Igor Canadi Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-16413 Storage engines that allow online com... Closed
Participants:

 Description   

Both RocksDB and WiredTiger (I think) can execute compact() operation concurrently with read and write requests. However, mongo currently locks an entire database with MODE_X when it compacts: https://github.com/mongodb/mongo/blob/master/src/mongo/db/commands/compact.cpp#L146

Would it make sense to remove this?



 Comments   
Comment by Michael Cahill (Inactive) [ 25/Jun/15 ]

Wow igor, that's... creative. I think we should get SERVER-16413 rather than copying that approach in WiredTiger.

Comment by Igor Canadi [ 22/Jun/15 ]

It would be nice to have, but not really hi-pri since we have hacked up compact-all API through setParameter()

https://github.com/mongodb-partners/mongo-rocks/blob/master/src/rocks_parameters.h#L72

Comment by Daniel Pasette (Inactive) [ 22/Jun/15 ]

Duplicate of SERVER-16413 (thanks for reminding me Igor). Can you give me a sense of how important this feature is for RocksDB?

Generated at Thu Feb 08 03:43:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.