reidkaufmann commented on code in PR #890:
URL:
https://github.com/apache/arrow-rs-object-store/pull/890#discussion_r4528913134
##########
src/local.rs:
##########
@@ -1032,6 +1096,147 @@ fn sync_and_close(file: File, path: &std::path::Path,
fsync: bool) -> Result<()>
Ok(())
}
+/// Directories whose entries changed, or are changing, without an fsync
since. Shared by every
+/// `LocalFileSystem` in the process: a durable write into a directory another
call is still
+/// making durable fsyncs it too, and a failed fsync leaves the directory to
the next write.
+///
+/// A map rather than a queue: changes to one directory collapse into one
entry, and the change
+/// counter tells a sync whether the directory changed again after the sync
started, so the entry
+/// is then kept.
+static UNSYNCED: Mutex<Unsynced> = Mutex::new(Unsynced {
+ dirs: BTreeMap::new(),
+ changes: 0,
+});
Review Comment:
That test wasn't a highly scientific comparison that I'd quote, just a quick
exploration. If that approach is desired, I can explore it further.
--
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]