[SERVER-4426] cryptic assertion when system.profile is not a capped collection Created: 04/Dec/11 Updated: 15/Feb/13 Resolved: 17/Jan/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Aaron Staple | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Participants: | |||||||||||||
| Description |
|
Users can manually create system.profile, and if they choose to do this they are supposed to create system.profile as a capped collection but this isn't actually enforced. If a non capped system.profile is created and operations are logged to it, non user friendly assertions can be triggered when the initial extent runs out of space: > db.createCollection("system.profile") { "ok" : 1 }> db.setProfilingLevel(2) { "was" : 0, "slowms" : 100, "ok" : 1 }> for( i = 0; i < 100; ++i ) { db.c.save({}); } to: 127.0.0.1:27017 Sun Dec 4 14:29:33 [conn1] test.c Assertion failure !loc.isNull() db/pdfile.cpp 2076 I think a similar error message may be possible if system.profile is a capped collection but was created in such a way that a record of the required size cannot be allocated (if system.profile is small or if all of its extents are small). We should probably check if system.profile is capped either when it is created or when an operation is logged to it. We should probably also trigger a more user friendly assertion if space for a profile record cannot be allocated in system.profile. |
| Comments |
| Comment by Eliot Horowitz (Inactive) [ 17/Jan/13 ] |