Skip to content

Commit

Permalink
cmd/dump: change missing attribute to warning log level (#4329)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhijian-pro authored Jan 10, 2024
1 parent e2b0e84 commit 77ce951
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/meta/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -3670,7 +3670,7 @@ func (m *redisMeta) dumpEntries(es ...*DumpedEntry) error {
return err
}
if inode != TrashInode {
logger.Errorf("Corrupt inode: %d, missing attribute", inode)
logger.Warnf("Corrupt inode: %d, missing attribute", inode)
}
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/meta/sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -3371,7 +3371,7 @@ func (m *dbMeta) dumpEntryFast(s *xorm.Session, inode Ino, typ uint8) *DumpedEnt
e := &DumpedEntry{}
n, ok := m.snap.node[inode]
if !ok && inode != TrashInode {
logger.Errorf("Corrupt inode: %d, missing attribute", inode)
logger.Warnf("Corrupt inode: %d, missing attribute", inode)
}

attr := &Attr{Typ: typ, Nlink: 1}
Expand Down
2 changes: 1 addition & 1 deletion pkg/meta/tkv.go
Original file line number Diff line number Diff line change
Expand Up @@ -2925,7 +2925,7 @@ func (m *kvMeta) dumpDir(inode Ino, tree *DumpedEntry, bw *bufio.Writer, depth i
entries = e.Entries
for n, de := range e.Entries {
if !de.Attr.full && de.Attr.Inode != TrashInode {
logger.Errorf("Corrupt inode: %d, missing attribute", inode)
logger.Warnf("Corrupt inode: %d, missing attribute", inode)
}
sortedName = append(sortedName, n)
}
Expand Down

0 comments on commit 77ce951

Please sign in to comment.