[SERVER-32628] Couldn't get output from mongo shell on windows for some edge cases Created: 10/Jan/18 Updated: 15/Nov/21 Resolved: 18/Jan/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 3.4.8 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Yi Zhao | Assignee: | Mark Agarunov |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Windows Pro10 |
||
| Attachments: |
|
| Participants: |
| Description |
|
If I type this command through mongo shell db.test.explain().find(), I should get a json output about the explain. It doesn't work for some cases I am not sure why. After investigating I found that below is the explain.find function definition in javascript.
compare with below command:
it looks like the previous one miss finish() call. I don't know why this finish is not called in some cases on windows. |
| Comments |
| Comment by Yi Zhao [ 18/Jan/18 ] |
|
Hello Mark, Thanks for checking it. But I don't think it is a VS code problem. VS code works fine on Mac and Linux. This issue only happens on windows. It can be easily reproducible on windows 10 pro. It happens when you put `explain` in front of the `find` like: `db.test.explain().find()`. But it works fine if you put the `explain` at the end of `find`. |
| Comment by Mark Agarunov [ 18/Jan/18 ] |
|
Hello zhaoyi0113@gmail.com, Thank you for the information. Looking at the screenshot, it appears that the explain() command had the proper output but it was truncated by the terminal, indicating this is likely an issue in the VSCode terminal as opposed to the mongo shell. Unfortunately without reproducible instances where the explain() output is incorrect we cannot definitively diagnose the cause of this issue. Thanks, |
| Comment by Yi Zhao [ 16/Jan/18 ] |
|
Hello Mark, This happens when I use VS Code terminal on Windows 10 Pro. I have attached the screenshot. |
| Comment by Mark Agarunov [ 10/Jan/18 ] |
|
Hello zhaoyi, Thank you for the report. To get a better idea of what the cause may be, could you please provide some of the cases where the explain command doesn't return output? Thanks, |