From 88d2e001231007fe82cadac511c9123d3f0ac6ad Mon Sep 17 00:00:00 2001 From: Minglei Jin Date: Tue, 14 Nov 2023 17:39:47 +0800 Subject: [PATCH 1/3] fix(cos/multipart): make chunk size not less than 5M --- source/common/src/cos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/common/src/cos.c b/source/common/src/cos.c index ea41afd8fb..6643cc3925 100644 --- a/source/common/src/cos.c +++ b/source/common/src/cos.c @@ -520,7 +520,7 @@ int32_t s3PutObjectFromFile2(const char *file, const char *object) { // div round up int seq; - uint64_t chunk_size = MULTIPART_CHUNK_SIZE >> 8; + uint64_t chunk_size = MULTIPART_CHUNK_SIZE >> 7; int totalSeq = ((contentLength + chunk_size - 1) / chunk_size); MultipartPartData partData; From 7f65e92b8140a3c5fd9594b51979b7dad3324300 Mon Sep 17 00:00:00 2001 From: Minglei Jin Date: Tue, 14 Nov 2023 19:27:18 +0800 Subject: [PATCH 2/3] tsdb/retention: not allow migrate backward --- source/dnode/vnode/src/tsdb/tsdbRetention.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/dnode/vnode/src/tsdb/tsdbRetention.c b/source/dnode/vnode/src/tsdb/tsdbRetention.c index bc76377597..f6888ba9cb 100644 --- a/source/dnode/vnode/src/tsdb/tsdbRetention.c +++ b/source/dnode/vnode/src/tsdb/tsdbRetention.c @@ -359,6 +359,9 @@ static int32_t tsdbDoRetentionOnFileSet(SRTNer *rtner, STFileSet *fset) { s3EvictCache(fobj->fname, fsize * 2); } */ + if (fobj->f->did.level > did.level) { + continue; + } tsdbInfo("file:%s size: %" PRId64 " do migrate from %d to %d", fobj->fname, fobj->f->size, fobj->f->did.level, did.level); From 951cfbb0967da6a10e440d2c47d271e59662637b Mon Sep 17 00:00:00 2001 From: Minglei Jin Date: Wed, 15 Nov 2023 09:08:27 +0800 Subject: [PATCH 3/3] fix(cos/list): free object array in exception --- source/common/src/cos.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/common/src/cos.c b/source/common/src/cos.c index 6643cc3925..71f0df5ebe 100644 --- a/source/common/src/cos.c +++ b/source/common/src/cos.c @@ -717,6 +717,7 @@ static SArray *getListByPrefix(const char *prefix) { return data.objectArray; } } else { + taosArrayDestroyEx(data.objectArray, s3FreeObjectKey); s3PrintError(__func__, data.status, data.err_msg); } return NULL;