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

no warning if compaction fail with missing objects #840

Merged
merged 2 commits into from Sep 16, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion pkg/meta/redis.go
Expand Up @@ -2633,7 +2633,9 @@ func (r *redisMeta) compactChunk(inode Ino, indx uint32, force bool) {
logger.Debugf("compact %d:%d: skipped %d slices (%d bytes) %d slices (%d bytes)", inode, indx, skipped, pos, len(ss), size)
err = r.newMsg(CompactChunk, chunks, chunkid)
if err != nil {
logger.Warnf("compact %d %d with %d slices: %s", inode, indx, len(ss), err)
if !strings.Contains(err.Error(), "not exist") || !strings.Contains(err.Error(), "not found") {
davies marked this conversation as resolved.
Show resolved Hide resolved
logger.Warnf("compact %d %d with %d slices: %s", inode, indx, len(ss), err)
}
return
}
var rs []*redis.IntCmd
Expand Down
4 changes: 3 additions & 1 deletion pkg/meta/sql.go
Expand Up @@ -2353,7 +2353,9 @@ func (m *dbMeta) compactChunk(inode Ino, indx uint32, force bool) {
logger.Debugf("compact %d:%d: skipped %d slices (%d bytes) %d slices (%d bytes)", inode, indx, skipped, pos, len(ss), size)
err = m.newMsg(CompactChunk, chunks, chunkid)
if err != nil {
logger.Warnf("compact %d %d with %d slices: %s", inode, indx, len(ss), err)
if !strings.Contains(err.Error(), "not exist") || !strings.Contains(err.Error(), "not found") {
logger.Warnf("compact %d %d with %d slices: %s", inode, indx, len(ss), err)
}
return
}
err = m.txn(func(ses *xorm.Session) error {
Expand Down
4 changes: 3 additions & 1 deletion pkg/meta/tkv.go
Expand Up @@ -2227,7 +2227,9 @@ func (m *kvMeta) compactChunk(inode Ino, indx uint32, force bool) {
logger.Debugf("compact %d:%d: skipped %d slices (%d bytes) %d slices (%d bytes)", inode, indx, skipped, pos, len(ss), size)
err = m.newMsg(CompactChunk, chunks, chunkid)
if err != nil {
logger.Warnf("compact %d %d with %d slices: %s", inode, indx, len(ss), err)
if !strings.Contains(err.Error(), "not exist") || !strings.Contains(err.Error(), "not found") {
logger.Warnf("compact %d %d with %d slices: %s", inode, indx, len(ss), err)
}
return
}
err = m.txn(func(tx kvTxn) error {
Expand Down