Remix.run Logo
thomas_fa 3 days ago

Thanks for pointing it out the mistakes. We should make it clearer, when fsync an opened file descriptor, it would only sync its own metadata. To make it truly persistent, we need to issue another fsync for the directory fd, which would make it more expensive.

dezgeg 3 days ago | parent [-]

You don't need to do that for every write though. Only when the database file is created.

thomas_fa 3 days ago | parent [-]

Yes, especially for our object storage each putObject would need to create new entry for in the (data)name space which would need fsync for dir fd.