4 ms·
> We just need more safe abstractions over posix APIs that cover different use-cases. I reach for lmdb for a lot of small projects. It feels like failure thoug
by josephg 6y ago
> We just need more safe abstractions over posix APIs that cover different use-cases.
I reach for lmdb for a lot of small projects. It feels like failure though. We shouldn't need things like that just to deterministically save data to disk.
> The command shouldn't block on fsync.
Sure - some operations can and should discard durability for higher performance. Sounds great to me. But maybe you should opt in to that. It certainly shouldn't be the only behaviour the kernel provides. If Inkscape crashes halfway through saving my work, it shouldn't by default end up in a half-saved state where my file is permanently corrupted.
But we can have our cake and eat it too here. It can be as simple as, if you don't wrap your write() calls in a filesystem transaction, the behaviour stays the same as it always was. Or maybe the default behaviour is that a write call entirely happens or entirely doesn't happen, but you can optionally ioctl(NO_DURABILITY) or something for extra performance in git checkout.
I hear you that git checkout performance (and things like it) are important to you. Keeping the current performance of those operations sounds good to me too!