Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fswatch library to watch/batch filesystem events, use in allocator #2792

Merged
merged 1 commit into from
Nov 9, 2022

Commits on Nov 9, 2022

  1. Add fswatch library to watch and batch filesystem events, use in allo…

    …cator
    
    This pull refactors the fsnotify code in allocator/main out to a
    shared library, and in that shared library implements a batched
    notification processor.
    
    Closes googleforgames#1816: This takes a slightly different approach than specified
    in the issue, instead choosing to just delay processing until after a
    batch processing period. I chose 1s - it's far longer than necessary,
    but still much shorter than it takes for the secret changes to
    propagate to the container anyways.
    
    I considered the approach in googleforgames#1816 of trying to parse the actual
    events, but it's too fiddly to get exactly right: e.g. maybe you only
    refresh on "write", but then "chmod" could make the file readable
    whereas it wasn't before, "rename" could expose a file that wasn't
    there before, etc.
    zmerlynn committed Nov 9, 2022
    Configuration menu
    Copy the full SHA
    618dbac View commit details
    Browse the repository at this point in the history