Skip to content

lib/db: Don't count invalid items to global state (ref #6850) - #6863

Merged
calmh merged 1 commit into
syncthing:mainfrom
imsodin:db/noInvInGlobal
Jul 30, 2020
Merged

calmh merged 1 commit into
syncthing:mainfrom
imsodin:db/noInvInGlobal

Conversation

@imsodin

@imsodin imsodin commented Jul 28, 2020

Copy link
Copy Markdown
Member

Purpose

#6850 (comment):

[...] why do we include receive-only changed items in the global count in the first place? That seems completely wrong to me: The global state is what everyone agrees upon. Receive-only changed items are the complete antithesis to that. If we didn't add it to the global state, receive-only items would lead to a higher local than global state, which seems right. It also removes the need for the workaround added in #6852. Thus I propose to not add invalid items to the global state.

This behaviour also fixes #6850, and in addition to the previous fix (which is reverted here) covers removing items from the global state as well.

@calmh

calmh commented Jul 30, 2020

Copy link
Copy Markdown
Member

There's been a lot of mental back and forth on having invalid stuff in the global or not. I can't help but feel we might be overlooking some corner case here. But I guess we will see what it is when it happens.

@calmh
calmh merged commit 850dd4c into syncthing:main Jul 30, 2020
@calmh calmh added this to the v1.9.0 milestone Jul 30, 2020
@imsodin
imsodin deleted the db/noInvInGlobal branch July 31, 2020 16:49
@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 Jul 31, 2021
@syncthing syncthing locked and limited conversation to collaborators Jul 31, 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.

Global state incorrect when ignoring local change

3 participants