From 35ef5eb2366d95a9dfcd62f0435cf8a9acc2aa6a Mon Sep 17 00:00:00 2001 From: Krishnan Parthasarathi Date: Sat, 13 Apr 2019 04:21:32 +0530 Subject: [PATCH] Don't exit background append if backend specific files show up (#7519) --- cmd/fs-v1-multipart.go | 9 ++++----- go.mod | 1 + go.sum | 2 ++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/cmd/fs-v1-multipart.go b/cmd/fs-v1-multipart.go index 8faf42a37..ed9245d80 100644 --- a/cmd/fs-v1-multipart.go +++ b/cmd/fs-v1-multipart.go @@ -98,9 +98,8 @@ func (fs *FSObjects) backgroundAppend(ctx context.Context, bucket, object, uploa } partNumber, etag, actualSize, err := fs.decodePartFile(entry) if err != nil { - logger.GetReqInfo(ctx).AppendTags("entry", entry) - logger.LogIf(ctx, err) - return + // Skip part files whose name don't match expected format. These could be backend filesystem specific files. + continue } if partNumber < nextPartNumber { // Part already appended. @@ -389,8 +388,8 @@ func (fs *FSObjects) ListObjectParts(ctx context.Context, bucket, object, upload } partNumber, etag1, _, derr := fs.decodePartFile(entry) if derr != nil { - logger.LogIf(ctx, derr) - return result, toObjectErr(derr) + // Skip part files whose name don't match expected format. These could be backend filesystem specific files. + continue } etag2, ok := partsMap[partNumber] if !ok { diff --git a/go.mod b/go.mod index fc3546f88..155d33e13 100644 --- a/go.mod +++ b/go.mod @@ -67,6 +67,7 @@ require ( github.com/nats-io/go-nats-streaming v0.4.2 github.com/nats-io/nats v1.7.2 github.com/nats-io/nkeys v0.0.2 // indirect + github.com/nats-io/nuid v1.0.1 // indirect github.com/nsqio/go-nsq v1.0.7 github.com/pascaldekloe/goe v0.1.0 // indirect github.com/pkg/errors v0.8.1 // indirect diff --git a/go.sum b/go.sum index 846d1f3ab..1198f6dd7 100644 --- a/go.sum +++ b/go.sum @@ -425,6 +425,8 @@ github.com/nats-io/nkeys v0.0.2 h1:+qM7QpgXnvDDixitZtQUBDY9w/s9mu1ghS+JIbsrx6M= github.com/nats-io/nkeys v0.0.2/go.mod h1:dab7URMsZm6Z/jp9Z5UGa87Uutgc2mVpXLC4B7TDb/4= github.com/nats-io/nuid v1.0.0 h1:44QGdhbiANq8ZCbUkdn6W5bqtg+mHuDE4wOUuxxndFs= github.com/nats-io/nuid v1.0.0/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/nsqio/go-nsq v0.0.0-20181028195256-0527e80f3ba5/go.mod h1:XP5zaUs3pqf+Q71EqUJs3HYfBIqfK6G83WQMdNN+Ito= github.com/nsqio/go-nsq v1.0.7 h1:O0pIZJYTf+x7cZBA0UMY8WxFG79lYTURmWzAAh48ljY= github.com/nsqio/go-nsq v1.0.7/go.mod h1:XP5zaUs3pqf+Q71EqUJs3HYfBIqfK6G83WQMdNN+Ito=