[COMPASS-3157] Enforce maxTimeMS for every query sent to the server Created: 28/Sep/18 Updated: 20/May/19 Resolved: 09/Apr/19 |
|
| Status: | Closed |
| Project: | Compass |
| Component/s: | CRUD, Query, Schema |
| Affects Version/s: | 1.16.0-beta.7, 1.15.4 |
| Fix Version/s: | 1.19.0 |
| Type: | Story | Priority: | Major - P3 |
| Reporter: | Emilio Scalise | Assignee: | Durran Jordan |
| Resolution: | Done | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||
| Issue Links: |
|
||||||||||||
| Epic Link: | COMPASS-2232 | ||||||||||||
| Story Points: | 3 | ||||||||||||
| Documentation Changes: | Needed | ||||||||||||
| Documentation Changes Summary: | The querybar now contains a new box to specify maxTimeMS (see attachment) |
||||||||||||
| Sprint: | Iteration Antelope, Iteration Bison | ||||||||||||
| Description |
|
Currently query filters that can be entered in the "Documents" panel don't use the maxtimems parameter. It is possible with non selective filters not supported by indexes to cause to run very heavy queries (COLLSCAN) on the MongoDB server causing possibly performance issues for the other clients. The parameter maxTimeMS is not set in the count and in the find commands sent. For example I loaded 5.7M tweets on a test MongoDB instances and I tried to use the filter {source: "a"}which causes a full collection scan over 5.7M documents:
The query is limited to 20 documents but has no maxTimeMS set. If you use the schema tab and you run the same filter, maxTimeMS is used, but I noticed that the same queries are then run without the timeout set:
I tested this with Compass 1.16.0 beta 7. |
| Comments |
| Comment by Githook User [ 09/Apr/19 ] |
|
Author: {'email': 'durran@gmail.com', 'name': 'Durran Jordan', 'username': 'durran'}Message: |
| Comment by Githook User [ 09/Apr/19 ] |
|
Author: {'email': 'durran@gmail.com', 'name': 'Durran Jordan', 'username': 'durran'}Message: |
| Comment by Githook User [ 09/Apr/19 ] |
|
Author: {'name': 'Durran Jordan', 'username': 'durran', 'email': 'durran@gmail.com'}Message: |