[SERVER-68971] explain_distinct.js fails when database doesn't exist Created: 18/Aug/22 Updated: 29/Oct/23 Resolved: 22/Sep/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.2.0-rc0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Dave Rolsky | Assignee: | Adi Zaimi |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | sharding-nyc-subteam2 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Participants: | |||||||||||||
| Story Points: | 3 | ||||||||||||
| Description |
|
This is the same issue as was fixed in |
| Comments |
| Comment by Vishnu Kaushik [ 28/Sep/22 ] | |
|
Wow it looks like the failing run is from a suite that doesn't have it! All other suites seem to have it (I need to confirm this). Having the param gets the cluster to execute the enableSharding command, which I guess implicitly creates the database. | |
| Comment by Adi Zaimi [ 28/Sep/22 ] | |
|
Discussed with Max, and there is a section in a yml file that allows the fixture to create/assign a db: | |
| Comment by Adi Zaimi [ 23/Sep/22 ] | |
|
This test failure occurs apparently only for mongosync; I dont know where/how mongodb passthroughs create the db (or otherwise why is it not an issue there). | |
| Comment by Vishnu Kaushik [ 23/Sep/22 ] | |
|
There's another failing test explain_count.js - see here. If we could get a long term solution in mongos that would be great! Alternatively maybe we can do something in our test infra on the mongosync side so that we create the database test as one of the config -> shell_options -> eval options in YAML, if you think that is better. | |
| Comment by Githook User [ 21/Sep/22 ] | |
|
Author: {'name': 'Adi Zaimi', 'email': 'adizaimi@yahoo.com', 'username': 'adizaimi'}Message: | |
| Comment by Adi Zaimi [ 14/Sep/22 ] | |
|
The change in https://github.com/10gen/mongo/pull/7563 creates a dummy collection which in turns creates the db which explain needs. Note that I tested that this fixes the test by implicitly dropping the db at the beginning of the test, to make sure that patch will succeed in c2c tests. | |
| Comment by Adi Zaimi [ 14/Sep/22 ] | |
|
Note that the error does not occur if I run a sharded test manually–the existing explain_distinct.js does not result in an error:
however if I modify explain_distinct.js to drop the db at the very beginning of the test, it does result in an error. I dont know how this test interacts with Cluster 2 Cluster (c2c) testing, but it might be the reason why we don't see this test failing in regular (non c2c) sharded testing – the db already exists in regular testing even when explain_distinct.js is run first. | |
| Comment by Adi Zaimi [ 14/Sep/22 ] | |
|
I'm fixing this test by creating a dummy collection (which will in turn create the underlying DB), that way even when this test is run first it will not fail. Note that this is a difference in how mongod and mongos behaves with the explain command when the db does not exist, and that may be something that we will want to change–keeping https://jira.mongodb.org/browse/SERVER-69416 to track that. | |
| Comment by Max Hirschhorn [ 26/Aug/22 ] | |
As part of this investigation it would be good to double check if there's something we can do for | |
| Comment by Githook User [ 25/Aug/22 ] | |
|
Author: {'name': 'Dave Rolsky', 'email': 'autarch@urth.org', 'username': 'autarch'}Message: REP-1303 Exclude explain_distinct.js from all CTC suites (#823) This is failing because of a known issue. See This PR also adds a small CLI tool to help us find which suites include a |