-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lib/model, lib/protocol: Fix file comparisons (fixes #8594) #8603
Conversation
Previous debug input didn't really give enough info to show what was happening, while it also printed full block lists which are enormously verbose. Now it consistently prints 1. what it sees on disk, 2. what it got from CurrentFile (without blocks), 3. the action taken on that file.
* debug: wip wip lib/scanner: More sensible debug output
* main: lib/scanner: More sensible debug output (syncthing#8596) gui: Allow automatic device ID selection on WebKit browsers (ref syncthing#8544) (syncthing#8597) gui, man, authors: Update docs, translations, and contributors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The generally stricter ownership/xattr checking is clear enough. The flag for the strict inode change time is a bit harder to reason about. Also they are independent, right? Maybe split them up in two PRs.
For the change time: The strict flag is only needed in a code branch for a receive-only optimisation, to not create an insignificant local change that will be resolved by the subsequent pull. I don't think this had any other intended purpose nor can I see one now. I'd rather move those conditions behind a receive-only flag than adding the strict inode change time flag that's only used there.
In maybe a bit clearer (and fewer) words: |
I implemented what I think you mean, in hiding the equivalence check behind a condition on the folder type, and removing the strict checking mode which is no longer required. |
* main: (36 commits) lib/protocol: Ignore inode time when xattr&ownership is ignored (fixes syncthing#8654) (syncthing#8655) lib/fs: Try to remove read only Windows files (fixes syncthing#3744) (syncthing#8650) gui: Add copy to clipboard, share by email, and share by SMS buttons to device IDs (fixes syncthing#2771, ref syncthing#3868) (syncthing#7984) gui, man, authors: Update docs, translations, and contributors build: Add GitHub actions build for Windows (syncthing#8627) gui: Fix connection type icon width (fixes syncthing#8592) (syncthing#8644) gui: Adjust connection type icon size scaling and alignment (syncthing#8645) docker: Use healthcheck endpoint (syncthing#8640) lib/connections: Use adaptive write size for rate limited connections (fixes syncthing#8630) (syncthing#8631) gui: Mark devices that haven't connected for a long time (fixes syncthing#7703) (syncthing#8530) gui: Fix rescan interval when add encrypted folder with watch for changes enabled (fixes syncthing#8570) (syncthing#8571) gui: Always show Out of Sync Items for remote devices (syncthing#8632) lib/fs: Let xattr test avoid non-test attributes (fixes syncthing#8601) (syncthing#8628) build: Add GitHub actions build for Windows gui, man, authors: Update docs, translations, and contributors gui: Display folder and device count number (syncthing#8615) gui, man, authors: Update docs, translations, and contributors lib/model, lib/protocol: Fix file comparisons (fixes syncthing#8594) (syncthing#8603) lib/scanner: More sensible debug output (syncthing#8596) gui: Allow automatic device ID selection on WebKit browsers (ref syncthing#8544) (syncthing#8597) ...
Currently there's a couple of problems with file comparisons introduced in the xattr+ownership work.
This attempts to fix that, by making the comparisons stricter. The effect will be more changes and more syncs, but the changes to apply should be minimal.
This very likely also fixes #8604 and fixes #8590.