Adding a clearFsStatCache flag to the local filesystem adapter for NFS cache issues#1902
Open
Samuel-Salter wants to merge 3 commits into
Open
Adding a clearFsStatCache flag to the local filesystem adapter for NFS cache issues#1902Samuel-Salter wants to merge 3 commits into
Samuel-Salter wants to merge 3 commits into
Conversation
…n a configuration flag is passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is my first PR here, I ran into an issue and instead of just reporting it I thought I would contribute a potential solution, apologies if that's not appropriate and you would rather I went through other channels, I'm very happy to do that.
The issue I ran into was that
is_diras called in thedirectoryExistsmethod of the local adapter was returning false in my AWS EFS setup for a directory that exists, and I could make it appear by callingls. After some digging I found that NFS has a cache layer that isn't cleared byis_dir(which uses stat under the hood) but it is possible to warm that cache with other commands.I don't think the behaviour I am adding in appropriate for most circumstances, it is adding extra file system calls to some pretty basic requests, which only really make sense in an NFS context. So I thought it would make sense as a constructor boolean option, and it could be activated by people using network file systems who want to cache-bust and are willing to pay the performance cost.
Like I have said, very open to feedback or to modify this.