-
Notifications
You must be signed in to change notification settings - Fork 113
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
RRB size table reports incorrect length #74
Comments
krobelus
added a commit
to krobelus/im-rs
that referenced
this issue
Mar 8, 2019
When a chunk does not fully fit in a node, we drain as many elements from the chunk into the node and later push the leftover chunk to a sibling. This commit makes sure that the size table of the parent node is updated correctly. We need to add the number of drained elements to the size table entry of the current element (and all entries to the left). Closes bodil#74
krobelus
added a commit
to krobelus/im-rs
that referenced
this issue
Mar 8, 2019
When a chunk does not fully fit in a node, we drain as many elements from the chunk into the node and later push the leftover chunk to a sibling. This commit makes sure that the size field of the parent node is updated correctly. For dense nodes, we can simply add the number of drained elements to the size. If there is a size table, we add that number to the size entry corresponding to the current element and all entries to the right. Closes bodil#74
krobelus
added a commit
to krobelus/im-rs
that referenced
this issue
Mar 8, 2019
When a chunk does not fully fit in a node, we drain as many elements from the chunk into the node and later push the leftover chunk to a sibling. This commit makes sure that the size field of the parent node is updated correctly. For dense nodes, we can simply add the number of drained elements to the size. If there is a size table, we add that number to the size entry corresponding to the current element and all entries to the right. Closes bodil#74
krobelus
added a commit
to krobelus/im-rs
that referenced
this issue
Mar 8, 2019
When a chunk does not fully fit in a node, we drain as many elements from the chunk into the node and later push the leftover chunk to a sibling. This commit makes sure that the size field of the parent node is updated correctly. For dense nodes, we can simply add the number of drained elements to the size. If there is a size table, we add that number to the size entry corresponding to the current element and all entries to the right. Closes bodil#74
krobelus
added a commit
to krobelus/im-rs
that referenced
this issue
Mar 8, 2019
When a chunk does not fully fit in a node, we drain as many elements from the chunk into the node and later push the leftover chunk to a sibling. This commit makes sure that the size field of the parent node is updated correctly. For dense nodes, we can simply add the number of drained elements to the size. If there is a size table, we add that number to the size entry corresponding to the current element and all entries to the right. Closes bodil#74
krobelus
added a commit
to krobelus/im-rs
that referenced
this issue
Mar 8, 2019
When a chunk does not fully fit in a node, we drain as many elements from the chunk into the node and later push the leftover chunk to a sibling. This commit makes sure that the size field of the parent node is updated correctly. For dense nodes, we can simply add the number of drained elements to the size. If there is a size table, we add that number to the size entry corresponding to the current element and all entries to the right. Closes bodil#74
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I found a trace where the size tables seem to behave strangely.
Reproduce it with this program,
cargo run --release < trace
should work where input filetrace
can be found here: https://gist.github.com/krobelus/b921d2f2cdde4b4b5101aba34fda87fe.It crashes in the last line because the computed index is out of bounds.
Below is a representation of the Vector
x
just before executing the last line of above program.I observe that the length of the middle part is reported to be 8215 (the last offset in the size table, see Node::len()).
However, summing the individual lengths of the 3 nodes in the middle part gives a different result:
4093 + 4096 + 45 = 8234. This is the actual length of the middle part.
This diff is a workaround that would prevent the example at hand from crashing, but I think that we need to make the size table report the correct size instead - or are they fine like this? Thank you!
The text was updated successfully, but these errors were encountered: