-
Notifications
You must be signed in to change notification settings - Fork 109
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
Strange behavior when often resizing #379
Comments
Do you have a reproducer that can be shared? |
It is in a public github repository, but it is not a "few lines of code",.but I might found the issue. I think the issue is actually in a situation where there is both a reader and a writer on the same table. But I still need to validate that it fails at that exact point. |
Do you have 2 separate Environment objects in the same process? If so, that's not allowed. |
@jnwatson Two seperate objects (one read-only, and one read-write). And with that, I have not seen any issue. |
I have some Windows users that cannot use sparse files and I was requested to implement slowly growing files myself. I am doing such via env.set_mapsize(self.initial_size). Effectively every time that lmdb.MapFullError is catched the database increases linearly. I am ending up in very odd errors.
The day before yesterday I opened an issue on the upstream bugtracker. Which was closed stating it was not a bug in LMDB. The error then was
Assertion 'IS_BRANCH(mc->mc_pg[mc->mc_top])' failed in mdb_cursor_sibling()
now I am ending up with:My application in essence does the following:
The issue can be fully reproduced. It will result in the same error, at the same position, considering the same input. It does not consistenly occur upon resizing.
I was referred in the upstream bug to the documentation.
My understanding from the above.
It may be called at later times if no transactions are active in this process. Note that the library does not check for this condition, the caller must ensure it explicitly. I can call the resize each time a transaction fails due to the MapFullError. Given that there are not other operations on that env. But if I read carefully: in this process. This suggest that no transactions at all may be active, also not reading in the other env.
I hope someone can help me in the right direction.
The text was updated successfully, but these errors were encountered: