Hacker News new | ask | show | jobs
by thomas_fa 34 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.
1 comments

You don't need to do that for every write though. Only when the database file is created.
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.