-
Notifications
You must be signed in to change notification settings - Fork 29
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
Bool element always false #150
Comments
Could you provide a test case ? There is tests of this in the tuple code, I don’t see how this can happen. |
Noticed here: https://github.com/bluejekyll/foundationdb-rs/blob/0.3/foundationdb/src/tuple/element.rs#L571 There are tests for a straight bool which works as intended, but not for an Element::Bool, i'm willing to put in a pr that addresses that Note: As the link suggests, this is an issue affecting branch 0.3 only as master was rewritten |
Nice catch, I didn’t saw it when I checked the code. By looking at the PR there is another bug in the tuple layer as a tuple at the first level should not be surrounded by NESTED, NIL |
so after the bug fix, it should go as [39, NESTED, 38, NIL] for the given test? |
Yeah |
Figured out encoding, trying to figure out decoding without causing too much hackiness |
Now I'm confused, the documentation says having the tuples as &[NESTED, 39, NESTED, 38, NIL, NIL] is okay according to https://github.com/apple/foundationdb/blob/master/design/tuple.md |
My bool test for element inside of
This test fails for
|
@Aioxas yeah, but if you look at the official python, go and java bindings, this only apply for nested tuple. At level 0 there is no need for NESTED, ..., NIL. python would decode it as The things is, I can't fix it in 0.3 without it being a breaking change. |
So is this PR still good for merging whenever 0.3.1 is ready, right? While the tuple breaking change will be addressed in a different PR? Which we can start a new issue convo for instead of hijacking this one? |
Yeah the PR is still good for merging. I don't know, it's easy to fix, but it would break working code and 0.4 (async/await) is not affected. Let's open a new issue, and keep this one for the Element::Bool error |
all bool elements are being stored as false.
The text was updated successfully, but these errors were encountered: