https://bugs.openldap.org/show_bug.cgi?id=10454
--- Comment #2 from kero renault.cle@gmail.com --- Hello everyone,
It seems this patch broke LMDB on macOS [1], specifically on the GitHub CIs (macOS 15.7.4 24G517). When using the MDB_WRITEMAP option to open an environment [2], it returns an MDB_BADTXN.
Two changes were made to the mdb_env_write_meta function to fix sync issues, and both use FDATASYNC with me->me_mfd. I tried fixing it by calling fcntl on env->me_fd rather than env->me_mfd. I'm not sure it makes sense, but it definitely made my test pass [3]. However, it's probably not synced to disk correctly.
[1]: https://github.com/meilisearch/heed/actions/runs/24962365156/job/73091106305... [2]: https://github.com/meilisearch/heed/blob/d4e3cfde9a843d8b04869d8bd432183dee1... [3]: https://github.com/meilisearch/heed/actions/runs/24992384687/job/73180864502...