kanidm / concread

Concurrently Readable Data Structures for Rust
Mozilla Public License 2.0
343 stars 15 forks source link

Fix BptreeMap range iter adjacent leaves #120

Closed Erigara closed 4 months ago

Erigara commented 4 months ago

Continuation of #118.

Description for the edge case is in the comment.

I haven't found a way to check if one leaf is ahead of another. So i took an advantage of the fact that we are advancing leaf iterators one at a time. I.e. before advancing right/left leaf iterator we check if they are pointing to the same node and if so there is no elements left.

Firstyear commented 4 months ago

Thank you! I'm so sorry you had so many problems with the iterators :(

Erigara commented 4 months ago

No problem, glad it fixed now