-
Notifications
You must be signed in to change notification settings - Fork 164
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
Better handling of unique and sparse index constraints #172
Conversation
- :sparse is always set (no harm in setting it, in theory speeds up some edge cases where _slugs is unset on a large number of records) - :unique is always set EXCEPT for an edge case related to paranoid docs. Previously we were not setting unique when by_model_type was true, however, I cannot think of a good reason not to set it in this case.
Don't merge until question in #137 is answered |
@johnnyshields Let me know when this is ready for your review. |
- Correct unique/sparse index logic
@johnnyshields What is the status of this pull request? I don't want to let these changes fall by the wayside. |
@digitalplaywright please give me a day or two to get back to you. Will take care of it. |
@johnnyshields Sounds good. Thanks. :) |
@digitalplaywright apologies this is still on my todo-list. Will get to it soon hopefully. |
No worries. I hope to have this work in the next release. However, the current version is quite stable so there is no urgency.— On Sun, Aug 24, 2014 at 1:43 AM, Johnny Shields notifications@github.com
|
@digitalplaywright apologies I've been lagging on this issue. Actually I've been busying scaling my own app and I've learned a lot about how MongoDB indexes work recently (some of it the hard way 😓 ). So will apply the lessons to this soon. |
No worries. I have been extremely busy as well so I can empathize. |
@johnnyshields I am thinking that a new release is overdue so I might make one without this change. Since we have not settled on a clearly better indexing approach it is probably better to not defer the release for that. Please let me know what you think. |
@digitalplaywright totally fine to release without this. I still need to sit down and think through this PR, I haven't gotten there yet. Apologies for leaving this out in the open so long. |
Hey @johnnyshields - what should we do about this one? |
@johnnyshields Want to clean this up/close it? |
Trying to finish this in #227. |
@dblock will close in favor of your PR |
Yup, #227 was merged. |
FYI was released in 5.3.0 |
:sparse
is now always set (no harm in setting it, in theory speeds up some edge cases where_slugs
is unset on a large number of records):unique
is now always set EXCEPT for an edge case related to paranoid docs. Previously we were not settingunique
whenby_model_type
was true, however, I cannot think of any reason not to set it in this case.