datalevin

Jacky Li 2025-07-16T13:55:47.133539Z

hi I am testing out datalevin on Windows 10 platform using jar lib. datalevin/datalevin {:mvn/version "0.9.22"}

Jacky Li 2025-07-16T13:57:13.240879Z

and getting native code error _`; Execution error (ExceptionInfo) at datalevin.binding.cpp.CppLMDB/key_range_list_count (cpp.clj:1035).`_ _`; Fail to count list in key range: #error {`_ _`; :cause "Native counter returns error code-1987251720"`_ _`; :data {}`_ _`; :via`_ _`; [{:type clojure.lang.ExceptionInfo`_ _`; :message "Native counter returns error code-1987251720"`_ _`; :data {}`_ _`; :at [datalevin.binding.cpp$dtlv_c invokeStatic "cpp.clj" 277]}]`_ _`; :trace`_ _`; [[datalevin.binding.cpp$dtlv_c invokeStatic "cpp.clj" 277]`_ _`; [datalevin.binding.cpp$dtlv_c invokePrim "cpp.clj" -1]`_ _`; [datalevin.binding.cpp.CppLMDB key_range_list_count "cpp.clj" 1018]`_ _`; [datalevin.binding.cpp.CppLMDB key_range_list_count "cpp.clj" 1007]`_ _`; [datalevin.storage.Store actual_a_size "storage.clj" 817]`_ _`; [datalevin.storage.Store a_size "storage.clj" 808]`_ _`; [datalevin.db.DB _count "db.clj" 294]`_ _`; [datalevin.db.DB _count "db.clj" 279]`_

Huahai 2025-07-16T19:09:45.280479Z

The native dependencies are compiled on Windows Server 2019 using Visual Studio 2022 stack, so it might not be compatible with older Windows.

Huahai 2025-07-16T19:19:13.168079Z

AI: The LMDB error code -1987251720 (hex: 0x89C000F8) corresponds to the error `MDB_CORRUPTED`. This indicates that the LMDB database file is corrupted. Possible Causes: 1. Improper Shutdown: The database wasn't closed properly (e.g., system crash, forced termination). 2. Filesystem Issues: Disk errors, permission problems, or filesystem corruption. 3. Hardware Failures: Bad sectors on the disk or memory corruption. 4. Concurrent Access Issues: Multiple processes writing to the same database without proper synchronization. 5. Database File Manipulation: Manual modification or copying of the database files while in use.

Jacky Li 2025-07-16T13:58:39.022679Z

this does not happen on Windows 11, any clue what might be the issue?