Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Initialize persistent tree correctly #271

Merged
merged 8 commits into from
Apr 30, 2021
Merged

Initialize persistent tree correctly #271

merged 8 commits into from
Apr 30, 2021

Conversation

ajeetdsouza
Copy link
Contributor

@ajeetdsouza ajeetdsouza commented Apr 29, 2021

PersistentTree currently does not set t.freePage and t.nextPage correctly upon opening an existing file, leading to errors. Additionally, stats are also lost. This PR computes these values when the tree is initialized.

TODO:

  • Add tests for PersistentTree

This change is Reviewable

z/btree.go Outdated Show resolved Hide resolved
z/btree.go Outdated Show resolved Hide resolved
z/btree.go Outdated Show resolved Hide resolved
@ajeetdsouza ajeetdsouza marked this pull request as ready for review April 29, 2021 19:35
Copy link
Contributor

@jarifibrahim jarifibrahim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Defer to @NamanJain8 for final approval.

z/btree.go Outdated Show resolved Hide resolved
z/btree_test.go Outdated Show resolved Hide resolved
z/btree_test.go Show resolved Hide resolved
@ajeetdsouza ajeetdsouza merged commit ad070f2 into master Apr 30, 2021
@ajeetdsouza ajeetdsouza deleted the ajeet/persist branch April 30, 2021 08:19
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants