[JAVA-3909] Add explain helpers Created: 14/Dec/20 Updated: 28/Oct/23 Resolved: 06/Jan/21 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Query Operations |
| Affects Version/s: | None |
| Fix Version/s: | 4.2.0 |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Jeffrey Yemin | Assignee: | Jeffrey Yemin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Minor Change | ||||
| Documentation Changes: | Needed | ||||
| Description |
|
Add explain helper methods for find and aggregate. A helper for explaining a find command is particularly important, as the 3.x driver supported explain via the $explain modifier, which has been removed in 4.0. An explain helper will provide an upgrade path for applications that are relying on explain support via modifiers. |
| Comments |
| Comment by Yann Simon [ 13/Jan/21 ] |
You're right, we don't use it on production. Only when running the application locally or in some test environments, we check if a query is doing a collection scan, and we log it to be able to fix that. |
| Comment by Jeffrey Yemin [ 13/Jan/21 ] |
|
I am curious though about the circumstances in which you use explain. What sort of program uses it? My expectation is that it's used during development but not in production, but I'd like to understand more about your use case. |
| Comment by Jeffrey Yemin [ 13/Jan/21 ] |
|
We're really trying to hold the line on not doing another feature release on the 3.x branch, and adding new methods like this to the public API would require that. I don't think explain support is quite enough to warrant it, but if we decide to release 3.13.0 for other reasons we will consider backporting this as well. |
| Comment by Yann Simon [ 13/Jan/21 ] |
|
Should we also have this helper in the 3.x driver to ease the upgrade process? |
| Comment by Githook User [ 11/Jan/21 ] |
|
Author: {'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}Message: Add reference docs for explain of find and aggregate (#626)
|
| Comment by Githook User [ 06/Jan/21 ] |
|
Author: {'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}Message: Add Javadoc indicating which server version supports explain
|
| Comment by Githook User [ 06/Jan/21 ] |
|
Author: {'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}Message: Fix broken explain tests
|
| Comment by Githook User [ 06/Jan/21 ] |
|
Author: {'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}Message: Support explain for aggregate operations (#623) Support explain for aggregate using the explain command,
|
| Comment by Githook User [ 05/Jan/21 ] |
|
Author: {'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}Message: Fix explain tests on older server versions
|
| Comment by Githook User [ 05/Jan/21 ] |
|
Author: {'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}Message: Remove extra whitespace
|
| Comment by Githook User [ 05/Jan/21 ] |
|
Author: {'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}Message: Support explain for find operations (#620) Support is only for server versions 3.2+
|