Skip to content

gui, lib/model: Prevent negative sync completion (fixes #4570) - #6248

Merged
calmh merged 1 commit into
syncthing:masterfrom
imsodin:all/negativeSyncCompl
Jan 3, 2020
Merged

calmh merged 1 commit into
syncthing:masterfrom
imsodin:all/negativeSyncCompl

Conversation

@imsodin

@imsodin imsodin commented Jan 3, 2020 •

Copy link
Copy Markdown
Member

Another shot at the problem coming up every now and then (#4570 for history and https://forum.syncthing.net/t/syncing-percentage-out-of-scale/14249 for the most recent case). It does two things: In the folder summary make sure the reported needed bytes is never negative and in the web UI use the same logic as on remote device, i.e. when there's deletes only display 95%. As to why the needed bytes should be negative:

This is essentially files becoming deleted while they are being downloaded.
https://forum.syncthing.net/t/syncing-percentage-out-of-scale/14249/2

As for testing: None. However it sounds plausible and even if it isn't actually the cause, it's a good safety measure in my opinion. If negative percentages come up again we can always reopen the issue and start thinking again :)

@calmh
calmh merged commit f56a554 into syncthing:master Jan 3, 2020
@imsodin
imsodin deleted the all/negativeSyncCompl branch January 3, 2020 13:13
calmh added a commit to calmh/syncthing that referenced this pull request Jan 4, 2020
* master:
  gui, lib/model: Prevent negative sync completion (fixes syncthing#4570) (syncthing#6248)
  build, pmp: Replace fork with upstream for go-nat-pmp and tidy go.mod (syncthing#6247)
  gui: Missing line break (fixes syncthing#6240) (syncthing#6241)
  docker: Fix HOME setting (fixes syncthing#6234) (syncthing#6235)
  golangci: Skip godox
  build(deps): bump github.com/mattn/go-isatty from 0.0.10 to 0.0.11 (syncthing#6231)
  lib/upgrade: Let Mac load .zip archives (syncthing#6230)
  lib/api: Prevent leaks in tests (syncthing#6227)
  lib/syncthing: Expose backend instead of lowlevel (syncthing#6224)
  gui: Prevent spurious api call (fixes syncthing#6222) (syncthing#6223)
  gui: Fix a typo in a class name (syncthing#6220)
  gui: Allow to degrade 'Automatic upgrades' option to 'No upgrades' (fixes syncthing#6044) (syncthing#6168)
  lib/db, lib/protocol: Compact FileInfo and BlockInfo alignment (syncthing#6215)
@calmh calmh added this to the v1.3.4 milestone Jan 13, 2020
@st-review st-review added the frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion label Jan 3, 2021
@syncthing syncthing locked and limited conversation to collaborators Jan 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants