Hello everyone,
About a week ago, I wrote about moving a piece of software out of writing multiple files and into LMDB.
Currently, the software will run on UBIFS (which is unsafe for NOSYNC option). Is multi-threaded and has no concept of transactions. Write operations are spread between threads. It only uses a mutex to avoid multiple writers, and tend to happen in a burst. Storage is implemented by a layer that has a similar API (read, write, delete) to LMDB.
My main goal is to replace the guts of this layer with LMDB (while keeping the API), to get an idea on how the program would work. Because of the lack of transaction concept in the current API, my initial approach was to accumulate transactions (after the first sync) for a couple of seconds, and then call env_sync. This solution is not power failure robust because of UBIFS characteristics.
I was trying to figure out other solutions that can be put this deferred concept in place, again, with the goal of proving worthiness of a full refactoring of the code in order to properly use LMDB.
Any suggestions?
Best, Abilio Marques