[SERVER-12408] Map reduce temporary collection can not be removed or accessed Created: 18/Jan/14 Updated: 11/Jul/16 Resolved: 17/Mar/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | MapReduce |
| Affects Version/s: | 2.4.4 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Teemu Ikonen | Assignee: | Stennie Steneker (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
ubuntu@db:~$ uname -a Amazon EC2 with EBS |
||
| Operating System: | Linux |
| Steps To Reproduce: | Can not reproduce. |
| Participants: |
| Description |
|
Ran accidentally map reduce to a busy server and had to kill the client process as some client connections were not responding anymore. After killing all processes the temporary collection '_purge' was not removed and even after cleanly shutting down and restarting mongo it can not be removed. ubuntu@db:~$ /opt/mongodb/bin/mongo > db._purge.drop() Sat Jan 18 04:50:54.451 [conn5226] CMD: drop war._purge ntoreturn:1 keyUpdates:0 reslen:117 140ms ntoreturn:1 keyUpdates:0 reslen:37 120ms update: { $set: { read: true } } nscanned:3 nupdated:2 keyUpdates:0 numYields: 1 locks(micros) w:783 107ms update: { $set: { read: true } } nscanned:39 nupdated:21 keyUpdates:0 numYields: 2 locks(micros) w:101363 186ms ntoreturn:1 ntoskip:0 nscanned:112460 keyUpdates:0 numYields: 251 locks(micros) r:1113617 nreturned:0 reslen:20 1933ms , reduce: , out: "_purge" } ntoreturn:1 keyUpdates:0 numYields: 69182 locks(micros) W:302844 r:1682304504 w:28452182 reslen:130 1952453ms ... |
| Comments |
| Comment by Teemu Ikonen [ 18/Mar/14 ] | |
|
Hi, the .stats() command works fine when called like in your example. I'll try to drop the collection when we have next maintenance break. Thanks! > db.getCollection('_purge').stats() , | |
| Comment by Stennie Steneker (Inactive) [ 17/Mar/14 ] | |
|
Hi Teemu, Thanks for the update. I'm going to close this issue, as the suggested syntax should work with the given collection name (I tested on MongoDB 2.4.9). If you want to test with a non-destructive command you could use:
Please feel free to reopen if you have any further questions on this issue. Thanks, | |
| Comment by Teemu Ikonen [ 17/Mar/14 ] | |
|
I have not touched it since. Database is in production and this does not seem to cause any problems so I rather not try to do anything about it. | |
| Comment by Stennie Steneker (Inactive) [ 17/Mar/14 ] | |
|
Hi Teemu, Were you able to drop the _purge collection? FYI, the following syntax should work from the mongo shell:
Regards, | |
| Comment by Teemu Ikonen [ 22/Jan/14 ] | |
|
Yes I have, but it's 14MB compressed and it might contain user sensitive data. I could put them on one our sites and give privately url to you for downloading, What happened exactly was that cleanup tool did first map reduce, and then started removing individual documents in batches by _id using the results from map reduce. | |
| Comment by Daniel Pasette (Inactive) [ 22/Jan/14 ] | |
|
Do you have the mongod log from the period when the map/reduce was killed? |