Skip to content
This repository has been archived by the owner on Feb 21, 2024. It is now read-only.

Bug in roaring bitmaps #76

Closed
tgruben opened this issue Apr 26, 2016 · 4 comments
Closed

Bug in roaring bitmaps #76

tgruben opened this issue Apr 26, 2016 · 4 comments

Comments

@tgruben
Copy link
Member

tgruben commented Apr 26, 2016

Seems to be an off by one kinda problem that shows up in the iterator. I've managed to narrow it to somewhere in the container allocation i think. I've got two import files that only differ by one line and one works and the other is broken. I happens when the highbits it the magic number of 1024, specifically the j value is between 65536 and 65599 inclusive.

broke.txt
works.txt

@tgruben
Copy link
Member Author

tgruben commented Apr 26, 2016

you have a quick thought on that @benbjohnson ? specifically around line hb := int(itr.j / 64)
Line 373(roaring/roaring.go). Basically what should be done when hb>1023. Sorry for the crunch, just trying to get some numbers together for a meeting and this was kinda a road blocker

@tgruben
Copy link
Member Author

tgruben commented Apr 26, 2016

I think i managed to fix it @benbjohnson, the behavior seems to match what's going on over in the roaring project.

@benbjohnson
Copy link
Contributor

@tgruben Awesome, sorry I wasn't able to dive into it earlier. What was the fix?

@tgruben
Copy link
Member Author

tgruben commented Apr 26, 2016

i went to the next container if the highbits where too big. I can't seem to find out why the bits would be to big, but in the other roaring project, they handled that situation the same way. @benbjohnson I'm "pretty" confident it was a good fix, all the other roaring test work. i'm gonna see if i can make a test that produces the same scenario our sample data presented.

@tgruben tgruben closed this as completed Apr 27, 2016
tgruben pushed a commit to tgruben/pilosa that referenced this issue Sep 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants