DETS table auto_save behaviour

Nicolas Martyanoff khaelin@REDACTED
Thu May 27 07:39:25 CEST 2021


Mikael Pettersson <mikpelinux@REDACTED> writes:
> I'm not too familiar with the internals of DETS, but basically data
> goes straight to/from disk while meta-data about allocated and free
> areas of the file are cached in memory. I don't know if writes are
> sync or not. In our experience, DETS files are somewhat fragile, plus
> they have a hard 2GB size limitation which made them extremely awkward
> for our use case (large mnesia tables). That's part of the reason we
> migrated most of our mnesia tables to eleveldb.
I was already wary of DETS due to the size limitation (the fact that the
limitation is still here in 2021 shows that nobody is interested in
maintaining the module), but you are confirming my first impression.

> If I had to have a standalone (not mnesia) local persistent store I'd
> probably go with eleveldb (or one of its spinoffs) if I needed lookups
> by key, or a disk_log if I just needed a FIFO buffer. disk_log allows
> you to choose how sync or async your writes are. _I_ wouldn't use
> DETS.
I also just realized that it does not support ordered_set. I'll probably
end up with sqlite3.

Thank you for the information!

Regards,

-- 
Nicolas Martyanoff
http://snowsyn.net
khaelin@REDACTED


More information about the erlang-questions mailing list