all: Add failure reporting (fixes #7028) (#6925)

This commit is contained in:
Simon Frei
2020-10-07 10:05:13 +02:00
committed by GitHub
parent b1db328931
commit 9d09fd6af3
10 changed files with 356 additions and 85 deletions
+4 -2
View File
@@ -865,11 +865,13 @@ func (f *folder) monitorWatch(ctx context.Context) {
f.setWatchError(err, next)
// This error was previously a panic and should never occur, so generate
// a warning, but don't do it repetitively.
if !warnedOutside {
if _, ok := err.(*fs.ErrWatchEventOutsideRoot); ok {
var errOutside *fs.ErrWatchEventOutsideRoot
if errors.As(err, &errOutside) {
if !warnedOutside {
l.Warnln(err)
warnedOutside = true
}
f.evLogger.Log(events.Failure, "watching for changes encountered an event outside of the filesystem root")
}
aggrCancel()
errChan = nil
+1
View File
@@ -65,6 +65,7 @@ func (f *sendOnlyFolder) pull() bool {
if !ok {
if intf.IsDeleted() {
l.Debugln("Should never get a deleted file as needed when we don't have it")
f.evLogger.Log(events.Failure, "got deleted file that doesn't exist locally as needed when pulling on send-only")
}
return true
}
+1
View File
@@ -1973,6 +1973,7 @@ func (s *indexSender) sendIndexTo(ctx context.Context) error {
l.Warnln("Failed repairing sequence entries:", dbErr)
panic("Failed repairing sequence entries")
} else {
s.evLogger.Log(events.Failure, "detected and repaired non-increasing sequence")
l.Infof("Repaired %v sequence entries in database", fixed)
}
}()