reidkaufmann commented on PR #890: URL: https://github.com/apache/arrow-rs-object-store/pull/890#issuecomment-6612677366
@mhilton thanks, that's a much nicer model. I've reworked this in 5348e09 and folded #892 in. There's now one process-wide set of directories that still need an fsync. Anything that changes a directory's entries (creating a directory, a rename, a link) adds the directory before the change is visible, and every durable write syncs what's pending before it returns. Entries only come out once a sync succeeds, so a failed sync just gets retried by the next write, and the registry and waiting are gone. A couple of places where I went slightly differently from your sketch, happy to change either: - I used a map instead of a `VecDeque`, so repeated changes to the same directory collapse into one entry, and a small change counter stops a sync that's finishing from dropping an entry that was changed again while it ran. - Each write syncs the pending directories on its own path rather than the whole set. That's all it needs, it keeps one failing disk from failing writes to unrelated stores, and the work per write stays proportional to path depth. One thing that does change compared with `main`: if a directory's fsync fails, writes under it keep retrying that sync and fail until it works, instead of succeeding while the directory might not be durable. That falls out of keeping entries until they're synced. I've left deletes alone for now; once #866 lands, a delete could record its parent the same way. -- 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]
