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

Update bdb. #20

Merged
merged 3 commits into from
Sep 1, 2023
Merged

Update bdb. #20

merged 3 commits into from
Sep 1, 2023

Conversation

nodech
Copy link
Member

@nodech nodech commented Aug 9, 2023

This is based on and closes #16

Main goal:

  • Fix segfaults that can happen when db is closed and any method is called. Now they instead return errors (throw exception for sync/return err via callback)

Other issues:

Note:

Since last leveldown ports and discontinuation of leveldown (move to abstract), it's highly unlikely we will do full ports like before. Now we can make the changes permanent.
Add guards on calls to check if the database is open, other than iterator which are closed themselves.
@nodech
Copy link
Member Author

nodech commented Aug 10, 2023

Two memleaks were introduced by this PR and one was old (NewBloomFilterPolicy was not freed). Fixed both

@nodech
Copy link
Member Author

nodech commented Aug 11, 2023

Iterators only method that is actively being used (Next) is behind the nexting_ guard. So it should be safe to use. If we want to make Seek async and add Prev then we will need to generalize this little bit more.

@nodech nodech marked this pull request as ready for review August 11, 2023 10:41
@nodech nodech merged commit 29087f9 into bcoin-org:master Sep 1, 2023
12 checks passed
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

Successfully merging this pull request may close these issues.

1 participant