Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

fix(files): update cached mounts when their storage changes - #66184

Open
ArtificialOwl wants to merge 1 commit into
masterfrom
fix/mount-cache-storage-id-change
Open

ArtificialOwl wants to merge 1 commit into
masterfrom
fix/mount-cache-storage-id-change

Conversation

@ArtificialOwl

Copy link
Copy Markdown
Member
  • Alice creates a local folder,
  • Alice creates a markdown document inside local folder,
  • Alice shares the markdown document to a local Bob,
  • Bob open the files in Nextcloud Text and close it
  • admin creates a groupfolder and give Alice access to it,
  • Alice move the local folder into groupfolder,
  • Bob open the files in Nextcloud Text and get a File not found message

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@provokateurin provokateurin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the storage id for Bob not change, because he only sees the file through the SharedStorage?

if (
$newMount->getMountId() !== $cachedMount->getMountId()
|| $newMount->getMountProvider() !== $cachedMount->getMountProvider()
|| $newMount->getStorageId() !== $cachedMount->getStorageId()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The use of findChangedMounts doesn't expect the storage id for a mount to change, so there will be problems.

@ArtificialOwl

Copy link
Copy Markdown
Member Author

Shouldn't the storage id for Bob not change, because he only sees the file through the SharedStorage?

The file is not on the previous storage id anymore; while moving from home::alice to the groupfolders, the storage id in filecache changed but the cached mount keep the previous storage id.
Bob can still see the file when browsing the folder and can still download the file as webdav will not use the cached mount; but opening the document uses the cached mount which still have the wrong storage id.

Maybe a better fix would be to catch the wrongly cached mount and try to fix the cache ?

@ArtificialOwl

Copy link
Copy Markdown
Member Author

I will ping Robin regarding #59900 when he's back

@icewind1991 icewind1991 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think I overlooked the case of moving shares to a different storage

@ArtificialOwl
ArtificialOwl marked this pull request as ready for review November 18, 2026 15:37
@ArtificialOwl
ArtificialOwl requested a review from a team as a code owner November 18, 2026 15:37
@ArtificialOwl
ArtificialOwl requested review from Altahrim and CarlSchwan and removed request for a team November 18, 2026 15:38
@ArtificialOwl
ArtificialOwl force-pushed the fix/mount-cache-storage-id-change branch from 679a6db to 6d7bd83 Compare November 18, 2026 15:38
@ArtificialOwl ArtificialOwl added the 3. to review Waiting for reviews label Nov 19, 2026
@ArtificialOwl ArtificialOwl added this to the Nextcloud 36 milestone Nov 19, 2026
@ArtificialOwl

Copy link
Copy Markdown
Member Author

/backport to stable35

@ArtificialOwl

Copy link
Copy Markdown
Member Author

/backport to stable34

Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Assisted-by: ClaudeCode:claude-opus-5-5
@ArtificialOwl
ArtificialOwl force-pushed the fix/mount-cache-storage-id-change branch from 6d7bd83 to d7999b6 Compare November 24, 2026 12:19

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants