Skip to content

lib/model: Retain index info for new folders/devs (ref #7100) - #7133

Merged
imsodin merged 1 commit into
syncthing:mainfrom
imsodin:model/indexFollowup7100
Nov 20, 2020
Merged

imsodin merged 1 commit into
syncthing:mainfrom
imsodin:model/indexFollowup7100

Conversation

@imsodin

@imsodin imsodin commented Nov 20, 2020

Copy link
Copy Markdown
Member

More fixes regarding races between folders being started and cluster configs being processed based on the logs provided in https://forum.syncthing.net/t/device-stays-out-of-sync-until-restart/15891

The fix for race on incoming cluster-configs in #7100 works, but it's an unclean and partial fix:
Index senders are started without index info, as the folder/device is new. That's correct for the starting sequence, but it's still bad because we don't store the index id. Meaning on a successive connect, we will re-exchange all index data. That is fixed by always storing the index data received in cluster-configs, even if we don't share the folder so far.
And we should also resend cluster-configs when adding folders on starting the model - connections may happen before that.

Testing

Extended the unit test introduced in #7100 to cover this scenario too.

@imsodin imsodin changed the title lib/model: Index racyness between conns and folders (ref #7100) lib/model: Retain index info for new folders/devs (ref #7100) Nov 20, 2020
@imsodin
imsodin merged commit db1f206 into syncthing:main Nov 20, 2020
@imsodin
imsodin deleted the model/indexFollowup7100 branch November 20, 2020 14:53
@calmh calmh added this to the v1.12.1 milestone Nov 24, 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 Nov 21, 2021
@syncthing syncthing locked and limited conversation to collaborators Nov 21, 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