Skip to content

lib/db: Use need func in withNeed and simplify - #6412

Merged
calmh merged 2 commits into
syncthing:masterfrom
imsodin:db/needSimplify
Mar 16, 2020
Merged

calmh merged 2 commits into
syncthing:masterfrom
imsodin:db/needSimplify

Conversation

@imsodin

@imsodin imsodin commented Mar 15, 2020

Copy link
Copy Markdown
Member

WithNeed uses it's own logic to determine whether a file is needed as opposed to using need. And it tries multiple file entries in the global list, even though if a missing or invalid file is encountered. The former should be an error (there must never be a file in the global list that doesn't otherwise exist) and the latter is unnecessary, as there isn't anything valid after an invalid file in the global list.

@calmh
calmh merged commit a1cb1d7 into syncthing:master Mar 16, 2020
calmh added a commit to imsodin/syncthing that referenced this pull request Mar 16, 2020
* master:
  lib/db: Use need func in withNeed and simplify (syncthing#6412)
  cmd/syncthing: Do auto-upgrade before startup (fixes syncthing#6384) (syncthing#6385)
@imsodin
imsodin deleted the db/needSimplify branch March 16, 2020 07:54
calmh added a commit to calmh/syncthing that referenced this pull request Mar 17, 2020
* master:
  lib/protocol: Zero pad index ID strings
  lib/db: Don't ignore failures unmarshaling version lists (syncthing#6411)
  lib/db: Use need func in withNeed and simplify (syncthing#6412)
  cmd/syncthing: Do auto-upgrade before startup (fixes syncthing#6384) (syncthing#6385)
  lib/db: Extend set test with second remote (syncthing#6402)
  gui, man, authors: Update docs, translations, and contributors
  lib/protocol: Use BlocksHash to compare block lists when available (syncthing#6401)
  lib/api: Ignore that one file that always shows up in git status
@calmh calmh added this to the v1.4.1 milestone Mar 18, 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 Mar 17, 2021
@syncthing syncthing locked and limited conversation to collaborators Mar 17, 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.

3 participants