-
Notifications
You must be signed in to change notification settings - Fork 114
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
Assertion failure in rrb::Size::pop #77
Comments
krobelus
added a commit
to krobelus/im-rs
that referenced
this issue
Mar 12, 2019
Previously this was only done for nodes of level > 1. Now the cases for level == 1 and level > 1 share some logic, this could be refactored in future. Fixes bodil#77
krobelus
added a commit
to krobelus/im-rs
that referenced
this issue
Mar 12, 2019
If the node we push to the left is not completely dense, then we convert to a size table. Previously this was only done for nodes of level > 1. Now the cases for level == 1 and level > 1 share some logic, this could be refactored in future. Fixes bodil#77
krobelus
added a commit
to krobelus/im-rs
that referenced
this issue
Mar 12, 2019
If the node we push to the left is not completely dense, then we convert to a size table. Previously this was only done for nodes of level > 1. Now the cases for level == 1 and level > 1 share some logic, this could be refactored in future. Fixes bodil#77
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This program causes an assertion failure
Here's what the tree looks like before the last insertion. It seems that the split is performed at the wrong chunk.
When we do
x.insert(514, 0)
, we need to split at index 514 which corresponds to 514 - 4 - 64 = 446 within middle. Hence the split should be done in the last but one node, but it seems like the one before is used.Should the middle be using a size table here?
The text was updated successfully, but these errors were encountered: