[SERVER-4123] fsync/lock blocks the progress of mongodump Created: 21/Oct/11 Updated: 04/Feb/12 Resolved: 27/Oct/11 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Chris Westin | Assignee: | Mathias Stearn |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Participants: | |||||||||
| Description |
|
fsync/lock is only supposed to prevent writes. But in a recent dba training class, we tried to do a backup on a slave by applying this and then using mongodump on it, only to discover that mongodump was blocked until the lock was released. Since mongodump only does queries, why is it blocked? Understand that locking is not required in this case (unlike file copies), but it is reasonable to use it if a guarantee of self-consistency for the server is required. |
| Comments |
| Comment by Eliot Horowitz (Inactive) [ 27/Oct/11 ] |
|
See |
| Comment by Chris Westin [ 26/Oct/11 ] |
|
Yes, I know, but we weren't doing any other writes. The replica set is quiescent, just having sat there while I was lecturing. Then we set out to do this on a secondary, and got blocked. |
| Comment by Scott Hernandez (Inactive) [ 22/Oct/11 ] |
|
If you fsync+lock and then do a write from another thread/client it will block all readers, no? Greedy write locks are like this. |