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

Need help investigating errors on closing pebble DB #2390

Closed
andrasbeni opened this issue Mar 10, 2023 · 3 comments
Closed

Need help investigating errors on closing pebble DB #2390

andrasbeni opened this issue Mar 10, 2023 · 3 comments

Comments

@andrasbeni
Copy link

andrasbeni commented Mar 10, 2023

In one of my tests, sometimes I get the following errors when I close the DB:

  • leaked iterators or
  • leaked memtable reservation

I was able to reproduce this with versions v0.0.0-20221104214247-8dc60b62ebbf and v0.0.0-20230307175142-1c38c4cb89d4.
I tied to figure out if there's an Iterator that I did not Close(), but have not found any. The second error is even more confusing to me.
How can I find what I'm doing wrong?

@jbowens
Copy link
Collaborator

jbowens commented Mar 10, 2023

Both errors are likely caused by leaking an Iterator. Unfortunately, we don't have any facilities to help debug this. #1597 would help, but we've never implemented it. I'd recommend instrumenting your code to track all your iterator opens and closes.

@andrasbeni
Copy link
Author

Thanks

@andrasbeni
Copy link
Author

The issue was I caused by a simple Get operation: we did not close the Closer object in case of an unmarshalling error.
I hope this helps someone.

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

No branches or pull requests

2 participants