mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-22 10:58:57 +00:00
lib/db: Add failure reports to failures iterating over hashes (#7755)
This commit is contained in:
parent
ce65aea0ab
commit
1a22689328
@ -398,12 +398,16 @@ func (t *readOnlyTransaction) withBlocksHash(folder, hash []byte, iterator Itera
|
||||
f.Name = osutil.NativeFilename(f.Name)
|
||||
|
||||
if !bytes.Equal(f.BlocksHash, hash) {
|
||||
l.Warnf("Mismatching block map list hashes: got %x expected %x", f.BlocksHash, hash)
|
||||
msg := "Mismatching block map list hashes"
|
||||
t.evLogger.Log(events.Failure, fmt.Sprintln(msg, "in withBlocksHash"))
|
||||
l.Warnf("%v: got %x expected %x", msg, f.BlocksHash, hash)
|
||||
continue
|
||||
}
|
||||
|
||||
if f.IsDeleted() || f.IsInvalid() || f.IsDirectory() || f.IsSymlink() {
|
||||
l.Warnf("Found something of unexpected type in block list map: %s", f)
|
||||
msg := "Found something of unexpected type in block list map"
|
||||
t.evLogger.Log(events.Failure, fmt.Sprintln(msg, "in withBlocksHash"))
|
||||
l.Warnf("%v: %s", msg, f)
|
||||
continue
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user