[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: |
|
||||||||
| 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 |
| 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 |