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

Share shards computation logic between searchShards and searchShardsCoun... #3530

Closed
wants to merge 1 commit into from
Closed

Share shards computation logic between searchShards and searchShardsCoun... #3530

wants to merge 1 commit into from

Conversation

Paikan
Copy link
Contributor

@Paikan Paikan commented Aug 18, 2013

This PR refactors a bit and add a shared method for searchShards and searchShardsCount to avoid divergent behavior in the future (like #2682 and #3268).

It seems like searchShardsCount is mainly implemented to test if we are hitting 1 shard or more than 1 shards so maybe it could be renamed and optimized for that specific use case.

@javanna
Copy link
Member

javanna commented Aug 20, 2013

@Paikan thanks a lot for your pull request! I left a comment in the code regarding a small optimization that we can add, other than that it looks good. If you can make that small change and update the pull request I'll push it.

@Paikan
Copy link
Contributor Author

Paikan commented Aug 20, 2013

@javanna ok i have updated the pull request

@Paikan
Copy link
Contributor Author

Paikan commented Aug 20, 2013

@javanna sorry I have squashed directly the commits maybe you would have prefered a separate commit for just the modification you asked and to squash it yourself

@javanna
Copy link
Member

javanna commented Aug 20, 2013

No worries @Paikan it's fine, I would have asked you to squash them anyway ;)
Running tests right now, will push soon!

@javanna
Copy link
Member

javanna commented Aug 20, 2013

Merged into 65056a6 and backported to 0.90 (8b0a013). Thanks @Paikan !

@javanna javanna closed this Aug 20, 2013
@Paikan Paikan deleted the refactor-search-shards branch August 20, 2013 13:59
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

Successfully merging this pull request may close these issues.

None yet

2 participants