Skip to content
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: Record error for unavailable files #5066

Merged
merged 3 commits into from Jul 14, 2018

Conversation

imsodin
Copy link
Member

@imsodin imsodin commented Jul 14, 2018

Purpose

Currently unavailable files show up as out-of-sync in the UI without any progress
or explanation. Now these files will be added to the failed items. The changed
count isn't inreased, as there is no point in retrying those files until a change
in connection happens. At that point, a pull will be scheduled anyway.

Testing

None.

Currently unavailable files show up as out-of-sync in the UI without any progress
or explanation. Now these files will be added to the failed items. The changed
count isn't inreased, as there is no point in retrying those files until a change
in connection happens. At that point, a pull will be scheduled anyway.
@@ -353,7 +354,7 @@ func (f *sendReceiveFolder) processNeeded(ignores *ignore.Matcher, dbUpdateChan
return true
}
}
l.Debugln(f, "Needed file is unavailable", file)
f.newError("checking availability", file.Name, errNotAvailable)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps just pull rather than check availability.

@@ -66,6 +66,7 @@ var (
errDirHasToBeScanned = errors.New("directory contains unexpected files, scheduling scan")
errDirHasIgnored = errors.New("directory contains ignored files (see ignore documentation for (?d) prefix)")
errDirNotEmpty = errors.New("directory is not empty")
errNotAvailable = errors.New("no peers that have this file are connected. Will be retried on next connection.")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very long, The crux here is that no connected device has this version of the file

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or even "latest version of the file"

@@ -354,7 +353,7 @@ func (f *sendReceiveFolder) processNeeded(ignores *ignore.Matcher, dbUpdateChan
return true
}
}
f.newError("checking availability", file.Name, errNotAvailable)
f.newError("processing needed", file.Name, errNotAvailable)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is visible in the UI, having processing needed will just make the string very long, just download or pull

@AudriusButkevicius AudriusButkevicius merged commit 5592b8b into syncthing:master Jul 14, 2018
@@ -353,7 +353,7 @@ func (f *sendReceiveFolder) processNeeded(ignores *ignore.Matcher, dbUpdateChan
return true
}
}
f.newError("processing needed", file.Name, errNotAvailable)
f.newError("pull", file.Name, errNotAvailable)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could also add file.ModifiedBy to the error message, explaining who has the file.

@calmh calmh added this to the v0.14.50 milestone Jul 24, 2018
@imsodin imsodin deleted the failUnavailable branch August 25, 2018 09:34
@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 15, 2019
@syncthing syncthing locked and limited conversation to collaborators Jul 15, 2019
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.

None yet

4 participants