Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dex recommends incorrect index #24

Open
rl-ilasic opened this issue Jan 23, 2014 · 1 comment
Open

dex recommends incorrect index #24

rl-ilasic opened this issue Jan 23, 2014 · 1 comment

Comments

@rl-ilasic
Copy link

When I run dex during mongodump i get a recommendation to insert below index into my collections.

{
    "key" : {
        "query" : 1,
        "$snapshot" : 1
    },
    "collection" : "reportDetail"
},

Feedback from MongoDB support on the recommended index:

Dex is confused and wrong. That is not an index you should create. You may want to file an issue with them if you are active there.

@esedor
Copy link
Contributor

esedor commented Jan 23, 2014

Your assertion is absolutely correct. This is wrong and should not be created. At-issue is the nitty code in parsers.QueryLineHandler.standardize_query, https://github.com/mongolab/dex/blob/master/dex/parsers.py#L206.

The logic is faulty owing to the inconsistent logging of $query vs. query, $sort vs, sort, and the the inclusion of special indicators like $cmd, $snapshot. Because this involves various versions of logs, and differences per operation, it is taking longer to plan a fix than I would like; therefore any suggestions are appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants