Skip to content
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

btree iterator doesn't appear to work #216

Open
freekvw opened this issue Jul 20, 2016 · 10 comments
Open

btree iterator doesn't appear to work #216

freekvw opened this issue Jul 20, 2016 · 10 comments

Comments

@freekvw
Copy link
Collaborator

freekvw commented Jul 20, 2016

The increment operation on the iterator in tpie::btree does not always terminate.

@tyilo
Copy link
Collaborator

tyilo commented Apr 5, 2018

Is this still a problem?

If so, do you have a test case?

@freekvw
Copy link
Collaborator Author

freekvw commented Apr 6, 2018

I just checked, and currently we crash when the iterator appears to get to the end. Jakob is working on a testcase, but isn't done yet.

@antialize
Copy link
Collaborator

Running
tpie/build/apps/siv_dump/siv_dump /tmp/dataset.siv
faults while
tpie/build/apps/siv_dump/siv_dump --recursive /tmp/dataset.siv
succedes

example.zip

@tyilo
Copy link
Collaborator

tyilo commented Apr 10, 2018

I found the problem: For serialized btrees t.end() != t.end() (same with begin). I'm working on a fix.

@tyilo
Copy link
Collaborator

tyilo commented Apr 10, 2018

Should be fixed by 09a2e18

@tyilo tyilo closed this as completed Apr 10, 2018
@antialize
Copy link
Collaborator

I don't think this fix works.

if i do

for (auto it=tree.begin(); it != tree.end(); ++it) {...}

It appears to fail as a new end node is constructed and deleted for every loop iteration. Also these lookups in unordered maps could be slow. Would it not be better to fix the comparison to use the offset?

@antialize antialize reopened this Apr 10, 2018
@tyilo
Copy link
Collaborator

tyilo commented Apr 10, 2018

Works on my computer.

@antialize
Copy link
Collaborator

We should not use unordred maps to cache nodes. We should fix the comparision..

@tyilo
Copy link
Collaborator

tyilo commented Apr 11, 2018

Fair enough, should be fixed in 1b6534f

@SSoelvsten
Copy link
Contributor

Is this still a problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants