felipecrv commented on issue #39967: URL: https://github.com/apache/arrow/issues/39967#issuecomment-1934465466
@pitrou `DurableDataSync` might be too close to the `fdatasync` syscall whereas `DurableSync` makes the definition of "sync" more open to what's more adequate to each implementation. @NicolasDenoyelle the answer about the directory question is easy: no. Reasons: as @pitrou said, (1) a file handle doesn't (can't) have a reference to the directory it's currently in (imagine how hard that would be in a multi-threaded environment!), and (2) an application that needs the directory entry update might have multiple files to sync and it should sync all files before it syncs the directory and it should do that once. You should also note that `fsync` doesn't eschew the app from doing its own concurrency control. If you `fsync` a file, then another thread updates that file, before you `fsync` the directory, you could `fsync` the directory with inconsistent data. It's the application's responsibility to prevent that. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
