Cache local mounts for filesystem access APIs by jedevc · Pull Request #6387 · moby/buildkit (original) (raw)
jedevc changed the title
Cache mounts over session Cache local mounts for filesystem access APIs
In addition to being wasteful, without this, concurrent calls to Mount
would have lost the previous target and so would never have been
removed.
Signed-off-by: Justin Chadwell me@jedevc.com
Previously, each call to ReadFile/ReadDir/StatFile would trigger
an entire Mount+Unmount operation. This could result in terrible
performance for repeated filesystem accesses - potentially worse that
one Mount+Unmount per file, if the file is read in ranges.
To resolve this, we now directly store the localMounter in the
gateway, and rely on the fact that repeated calls to it return the same
value. These mounts will only be removed when the gateway itself is
released.
Signed-off-by: Justin Chadwell me@jedevc.com
Signed-off-by: Justin Chadwell me@jedevc.com
jedevc deleted the cache-mounts-over-session branch
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
[ Show hidden characters]({{ revealButtonHref }})