Merge pull request #23695 from taosdata/fix/TD-27313

fix(cos/list): free object array in exception
This commit is contained in:
Hongze Cheng 2023-11-15 11:09:38 +08:00 committed by GitHub
commit ed6be3b8c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -520,7 +520,7 @@ int32_t s3PutObjectFromFile2(const char *file, const char *object) {
// div round up // div round up
int seq; 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); int totalSeq = ((contentLength + chunk_size - 1) / chunk_size);
MultipartPartData partData; MultipartPartData partData;
@ -717,6 +717,7 @@ static SArray *getListByPrefix(const char *prefix) {
return data.objectArray; return data.objectArray;
} }
} else { } else {
taosArrayDestroyEx(data.objectArray, s3FreeObjectKey);
s3PrintError(__func__, data.status, data.err_msg); s3PrintError(__func__, data.status, data.err_msg);
} }
return NULL; return NULL;

View File

@ -359,6 +359,9 @@ static int32_t tsdbDoRetentionOnFileSet(SRTNer *rtner, STFileSet *fset) {
s3EvictCache(fobj->fname, fsize * 2); 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, tsdbInfo("file:%s size: %" PRId64 " do migrate from %d to %d", fobj->fname, fobj->f->size, fobj->f->did.level,
did.level); did.level);