Repository navigation
Fix cache invalidation not reaching users a root is shared with - #19
Merged
Merged
Conversation
Shared users stopped receiving invalidation callbacks for changes made by
the owner (and vice versa):
- The fileserver only notifies sessions seen within activeSessionTTL (45s),
but activity was only refreshed on register/cd/upload. Idle clients were
silently dropped. The client now sends a ChangeDir(".") heartbeat every
15s while connected.
- ChangeDir updated currentDirFID for every session on the same root, so
one user's cd moved the other user's tracked directory. With an
authenticated caller, only that user's session is updated now.
- Callbacks only printed a "please refresh" hint and walked the cache tree
from the callback goroutine. They now queue the invalidation, which the
shell applies before the next ls/cd/cat, so listings are re-fetched.
The cache handler pointer is now guarded against concurrent access.
Adds regression tests for per-user dir tracking, heartbeat reactivation,
and end-to-end shared-root cache invalidation.
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.
Shared users stopped receiving invalidation callbacks for changes made by the owner (and vice versa):
Adds regression tests for per-user dir tracking, heartbeat reactivation, and end-to-end shared-root cache invalidation.