[SERVER-8207] $centerSphere query hangs server Created: 17/Jan/13 Updated: 08/Mar/13 Resolved: 08/Mar/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Geo |
| Affects Version/s: | 2.2.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | Anh H. Trinh | Assignee: | hari.khalsa@10gen.com |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Operating System: | Linux |
| Steps To Reproduce: | 1. Obtain a large collection (>20mil) of docs with 2d index |
| Participants: |
| Description |
|
We have a collection with about 27mil objects with 2d index. A single $nearSphere query hangs the server, make it unresponsive to other queries including db.serverStatus() and also hangs mongotop and mongostat.
The offending query use a radius of only 300 meters:
The operation grabbed a global lock and render the server useless until someone perform a manual db.killOp(). GDB stack traces are here: https://gist.github.com/4555130 Beside the obvious performance issue of the query, the server must be tolerant against such "query of death". At the very least it should keep the diagnostic tool such as (mongotop, mongostat, db.serverStatus()) functional. |
| Comments |
| Comment by hari.khalsa@10gen.com [ 07/Feb/13 ] |
|
Have you let the query run to completion, and if so, how long does it take? I suspect that it's just going to take a long time to look at 27M objects, especially if they're all near the start of the search. The stack traces suggest that it's still doing the search when you interrupt it. The 2d indexing code doesn't give other commands a chance to run during its search. This is a known bug. If possible, I suggest grabbing a copy of the 2.4RC and trying the 2dsphere index. I suspect it will perform better on this query, and the search is structured to allow other operations. |
| Comment by Anh H. Trinh [ 25/Jan/13 ] |
|
any idea on how this will move forward? fix ver is "debugging with submitter", but i haven't got any contact from the assignee, not sure if I can provide anything extra to help here. also ticket name should s/nearSphere/centerSphere/ |