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

Using filter "in" with another filter on indexed bigInt does not return all values #152

Closed
Mitsichury opened this issue Sep 11, 2022 · 7 comments · Fixed by #154, appy-one/acebase-server#35 or #160
Assignees
Labels
bug Something isn't working dependencies Pull requests that update a dependency file

Comments

@Mitsichury
Copy link

Hi :)

I have trouble getting all values when using indexed BigInt value and combining query filters.
You can find a test that reproduce ths issue here : https://github.com/appy-one/acebase/pull/151/files
Hope it helps you, thank you for your amazing app :)

Best regards,
Mitsi.

@Mitsichury Mitsichury changed the title Using filter "in" with another filter on bigInt does not return all values Using filter "in" with another filter on indexed bigInt does not return all values Sep 11, 2022
@appy-one
Copy link
Owner

Thanks Mitsi, after some digging, it appears to be a bug in the serialization of BigInts to binary format and/or vice versa. I'll have to fix that algorithm.

@appy-one appy-one self-assigned this Sep 12, 2022
@appy-one appy-one added bug Something isn't working dependencies Pull requests that update a dependency file labels Sep 12, 2022
@appy-one
Copy link
Owner

Fix has been published in [email protected] and [email protected]

Note that you'll have to update the BigInt values in your db because some have been stored incorrectly!

Sponsor AceBase Spread the word contribute

@Mitsichury
Copy link
Author

Hi :)
Sorry for the late answer, I've updated to the last version 1.24.4, my tests still don't work if I create indexes on Bigint and I apply filters on it. But it works really great without indexes. I don't know why for now because your unit tests are green, I'll try to reproduce the issue.
Thank you for your amazing work :) !

@Mitsichury
Copy link
Author

I've found how to reproduce it !
I've modified a test to make it close to my usage : https://github.com/appy-one/acebase/pull/159/files

  • Empty db
  • Creating indexes
  • Adding some data by unit call instead of set collection (like if I did it with http requests)
  • Requesting data

I don't know if it's a bug or a misusage from me.

Thank you,
Mitsi.

@appy-one
Copy link
Owner

appy-one commented Oct 3, 2022

Thanks for your PR, I'm on it!

@appy-one appy-one reopened this Oct 3, 2022
appy-one added a commit that referenced this issue Oct 3, 2022
appy-one added a commit that referenced this issue Oct 3, 2022
appy-one added a commit that referenced this issue Oct 3, 2022
* Also index BigInts on updates, fixes #152

* chore: build

* added unit test for #152
@appy-one
Copy link
Owner

appy-one commented Oct 3, 2022

Hi Mitsi, I've fixed the issue and released new version v1.24.5
Note that the code in your PR does contain an async issue with forEach, see my comments there.
Let me know if it all works!

@Mitsichury
Copy link
Author

Hi @appy-one thank you for your review and your fix, it's working really good :D
Best regards,
Mitsi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies Pull requests that update a dependency file
Projects
None yet
2 participants