3 ms·
"if you are creating a file, to ensure full synchronisation you also need to fsync the parent directory, otherwise the file can be fsynced but the update to the
by weinzierl 2y ago
"if you are creating a file, to ensure full synchronisation you also need to fsync the parent directory, otherwise the file can be fsynced but the update to the directory lost."
And if you need this in Java you still have resort to ugly hacks.
https://github.com/apache/lucene/issues/7231 https://github.com/apache/lucene/issues/7231
- jryan49 2y agoThis says the bug is fixed? https://bugs.openjdk.org/browse/JDK-8066915 https://bugs.openjdk.org/browse/JDK-8066915
- weinzierl 2y agoThe point is that there is no official way to fsync a directory in Java and that everyone is relying on an unintentional side effect of an unrelated function to accomplish it. The link I supplied is about the fact that the side effect briefly disappeared in Java 9 until enough people complained. We're still living in xkcd 1172 land with this, have been for a decade or who knows how long.
- jryan49 2y agoJava does "abstract" the operating system away from you and in systems programming with java you can end up with leaky abstractions.