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

Bugx .one() raises "Expected one result!" but all() returns just one entry #57

Closed
Christoph-Schabert opened this Issue Mar 15, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@Christoph-Schabert

Christoph-Schabert commented Mar 15, 2017

Hello,
i have observed that our code raises a "Except one result!" exception.

engine.query(instance).filter(fqdn='some', deleted_at=None).one()

The problem is that when i call this code

engine.query(instance).filter(fqdn='some', deleted_at=None).all()

It returns an array with just one result (as excepted).

Some observations:
The limit(2) condition prevent to get results.
This request is on a global secondary index. There are more than one fqdn with 'some' but only one that where delete_at is set to None

@stevearc

This comment has been minimized.

Owner

stevearc commented Mar 16, 2017

Oh no...I think that this is a problem with "scanned items" limit vs "returned items" limit. I wrote a bunch of code in dynamo3 to handle those cases but I may not have updated flywheel to do the correct thing. I'll dig into it and if that's what's going on I'll get a fix in this weekend

@stevearc stevearc closed this in 538f4d3 Mar 18, 2017

@stevearc

This comment has been minimized.

Owner

stevearc commented Mar 18, 2017

Should be fixed and released in version 0.5.2

xuru added a commit to xuru/flywheel that referenced this issue Dec 8, 2017

Merge commit '99b2bc39b7c621bd3a6ec18e023dd28524b62a58'
* commit '99b2bc39b7c621bd3a6ec18e023dd28524b62a58':
  Add a maintainer message
  Bump version: 0.5.1 → 0.5.2
  Update changelog
  Fix stevearc#57: Change limit behavior to be as described in docs
  End of life warning
  Fix stevearc#55: Don't insinuate that you should catch ValueError
  For stevearc#54: Remove more outdated docs on overflow fields
  Fix stevearc#54: Get rid of outdated docs talking about overflow fields
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment