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

Return empty result set if database not present in shard data #2865

Merged
merged 3 commits into from
Jun 11, 2015

Conversation

otoolep
Copy link
Contributor

@otoolep otoolep commented Jun 10, 2015

Potential fix for #2851

The idea here is that the upper layers should check if a particular database exists. If those checks pass, the query gets to the shard data, but the database does not exist there, it's because no data has been written for that database to the shard. So just return an empty set.

@otoolep otoolep force-pushed the db_not_found_no_data branch from 5f73dfb to 68ecfd0 Compare June 10, 2015 03:59
@otoolep
Copy link
Contributor Author

otoolep commented Jun 10, 2015

@pauldix

@otoolep
Copy link
Contributor Author

otoolep commented Jun 10, 2015

@corylanou @jwilder

@otoolep
Copy link
Contributor Author

otoolep commented Jun 10, 2015

Note - I am not quite sure about the test cases, if this approach looks correct, I can dig more into what would be the correct way to unit test this.

@corylanou
Copy link
Contributor

I think that makes sense. Would love to have some integration tests for this but I don't think we are ready to create those scenarios yet.

+1

@neonstalwart
Copy link
Contributor

agree that empty response is more suitable than database not found (presuming that something higher up has verified that a database does exist)

@otoolep otoolep force-pushed the db_not_found_no_data branch from 68ecfd0 to 8539322 Compare June 10, 2015 20:32
@otoolep otoolep force-pushed the db_not_found_no_data branch from 8539322 to b65396e Compare June 11, 2015 02:23
@otoolep
Copy link
Contributor Author

otoolep commented Jun 11, 2015

Implicit +1 from @pauldix

otoolep added a commit that referenced this pull request Jun 11, 2015
Return empty result set if database not present in shard data
@otoolep otoolep merged commit 95500d7 into master Jun 11, 2015
@otoolep otoolep deleted the db_not_found_no_data branch June 11, 2015 02:24
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.

3 participants