why mdbx_env_set_option MDBX_opt_sync_period may cause Assertion failed: (data->iov_len == 0 && olddata.iov_len == 0), function mdbx_cursor_put, file mdbx, line 18172.
#248
Comments
Assertion failed: (data->iov_len == 0 && olddata.iov_len == 0), function mdbx_cursor_put, file mdbx, line 18172.
I assume that the reason is that you are using a transaction or a cursor from different threads. |
I had spent some time for digging your issue.
So I continued to dig further, but so far I have not been able to reproduce the error locally or find a potential cause. However, along the way I rewrote/simplified one of the functions (the new code is now available in the If the problems persist, then for further analysis I need a stack trace of assertion failure from build with the |
I run a docker to show this error , you can ssh login see the error
password is when ssh login , run the c file is
can build and run demo |
by the way , I found another error
can reshow in the above ssh machine in dir
see src/range.rs line 54 when run happend
this database flag is MDBX_DUPFIXED|MDBX_DUPSORT|MDBX_INTEGERDUP|MDBX_INTEGERKEY edit |
I have reproduced both cases:
Thank for reporting. |
@gcxfd, please check and close issue on succes. |
thanks I add the flag for env by proc_macro I closeed the database by
https://github.com/rmw-lib/mdbx/blob/0c7f3ed8298ba242506baa1cfb4d0cbfd0c14499/src/env.rs#L182 I will write document for those when finish coding |
gcxfd commentedDec 3, 2021
•
edited
I'm write a wrap for libmdbx in rust , I found when use MDBX_opt_sync_period 65536, open env with MDBX_SAFE_NOSYNC
then when I set a MDBX_DUPSORT value with the same value the second time
some times (not every time) may cause
I view the c code , found error cause from there (and the real error is olddata.iov_len!=0)
but when I comment mdbx_env_set_option MDBX_opt_sync_period , still use MDBX_SAFE_NOSYNC, the error never happened
code https://github.com/rmw-lib/mdbx/tree/5a7ee9598f6b99342eefa9eae17df886c7f56238
screenshot
The text was updated successfully, but these errors were encountered: