fix(symlinks): re-arm the cache TTL when the reload returns 304, release 0.43.8-dc.3 - #12
Merged
Merged
Conversation
loadSymlinksCache returned early on a 304 without touching symlinksCacheTime, so the TTL guard at the top of the function never passed again. In any directory that has a .geesefs_symlinks file, every failed lookup past the first TTL expiry re-issued the conditional GET. Failed lookups are the most common metadata operation on a mount (import path search, stat probes, shell completion), and --enable-symlinks-file is passed on every session and job VM, so this put an S3 round trip on the hottest metadata path. A 304 means the cached copy is current, so record the check time and let the guard serve the next miss locally.
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.
loadSymlinksCachereturned early on a 304 without settingsymlinksCacheTime, so its own TTL guard never passed again and every failed lookup past the first expiry re-issued the conditional GET — on the hottest metadata path of every session and job VM, since--enable-symlinks-fileis always passed.New test
TestCacheNotModifiedRearmsTTLcounts backend GETs: 3 before the fix, 2 after. FullSymlinkssuite: 63 passed.