Hi Christoph et al.,
I'm testing an integration between my application and the HamsterDB C API (2.1.6), and I'm seeing some puzzling behavior. When I do the following things...
1. Create a new environment and local database with the `HAM_ENABLE_TRANSACTIONS' flag set
2. Begin a transaction
3. Insert multiple keys with `ham_db_insert'
4. Commit the transaction
5. Exit without cleaning up the environment (e.g., via `SIGKILL')
...I wind up with an un-openable environment. That is to say, if I later attempt to open the environment via `ham_env_open' (and `HAM_ENABLE_TRANSACTIONS', I get `HAM_NEEDS_RECOVERY'. If I add the `HAM_AUTO_RECOVERY' flag, my process crashes with:
ASSERT FAILED in file blob_manager_disk.cc, line 357:
"old_blob_header.get_self() == old_blobid"
Aborted (core dumped)
What am I doing wrong? It might be worth noting that this only happens when multiple keys are inserted as part of the transaction described above. I've attached a small C program that captures my use case and can be used to reproduce the behavior I'm seeing. (Run "a.out -i" followed by "a.out -r".)
Thanks,
Julian