Skip to content

dont reuse etag for folders marked explicitly unscanned - #41327

Merged
icewind1991 merged 4 commits into
masterfrom
dont-reuse-metadata-unscanned
Jan 31, 2024
Merged

dont reuse etag for folders marked explicitly unscanned#41327
icewind1991 merged 4 commits into
masterfrom
dont-reuse-metadata-unscanned

Conversation

@icewind1991

@icewind1991icewind1991 commented Nov 7, 2023

Copy link
Copy Markdown
Member

Speculated issue:

  • An external smb storage is setup where the folder mtime doesn't change when new files get created
  • files_external:notify is running marking the parent folder of any created file with a size of -1
  • the background scanner triggers for the parent folder, finding the new file
  • because the mtime of the folder didn't change, the old etag for the parent folder is reused
  • the sync client doesn't pickup the change because the etag of the parent folder didn't change.

A use case that might trigger this is an external smb storage where the underlying fs doesn't change folder mtime as we expect but "files_external:notify" is being used to process external file changes.

I was able to reproduce this with manual touching to "unchange" the folder mtime a few times but then something changed and I can't anymore...

@icewind1991
icewind1991force-pushed the dont-reuse-metadata-unscanned branch from 4b28d58 to c052febCompareNovember 7, 2023 15:53
@solracsfsolracsf added this to the Nextcloud 28 milestone Nov 21, 2023
@blizzzblizzz mentioned this pull request Nov 22, 2023
5 tasks
@icewind1991
icewind1991force-pushed the dont-reuse-metadata-unscanned branch 3 times, most recently from 4a8173c to d9aa466CompareNovember 22, 2023 15:39
@blizzzblizzz modified the milestones: Nextcloud 28, Nextcloud 29Nov 23, 2023
@icewind1991

Copy link
Copy Markdown
MemberAuthor

Fix confirmed working by customer

@icewind1991
icewind1991force-pushed the dont-reuse-metadata-unscanned branch from d9aa466 to e4374ecCompareDecember 4, 2023 15:38
@icewind1991
icewind1991 marked this pull request as ready for review December 4, 2023 15:40
@icewind1991
icewind1991 requested review from a team, come-nc, nfebe and sorbaugh and removed request for a teamDecember 4, 2023 15:40
@icewind1991icewind1991 added the 3. to review Waiting for reviews label Dec 4, 2023
@icewind1991

Copy link
Copy Markdown
MemberAuthor

/backport to stable27

@icewind1991

Copy link
Copy Markdown
MemberAuthor

/backport to stable26

@come-nc

Copy link
Copy Markdown
Contributor

@icewind1991 backport to stable28 as well no?

Comment threadlib/private/Files/Cache/Scanner.php
Comment threadlib/private/Files/Cache/Scanner.php
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
…ning
Signed-off-by: Robin Appelman <robin@icewind.nl>
@icewind1991

Copy link
Copy Markdown
MemberAuthor

/backport to stable28

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

Labels

3. to reviewWaiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@icewind1991@come-nc@nfebe@blizzz@solracsf