fix: correct numberFileset counting cause S3 retention happened while compact. (#30282)

This commit is contained in:
Zhixiao Bao 2025-03-21 14:50:41 +08:00 committed by GitHub
parent f2dd821314
commit ec7177cb7d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -678,13 +678,13 @@ static int32_t tsdbDoS3Migrate(SRTNer *rtner) {
int32_t r = taosStatFile(fobj->fname, &size, &mtime, NULL);
if (size > chunksize && mtime < rtner->now - tsS3UploadDelaySec) {
if (pCfg->s3Compact && lcn < 0) {
extern int32_t tsdbAsyncCompact(STsdb * tsdb, const STimeWindow *tw, bool sync);
extern int32_t tsdbAsyncCompact(STsdb * tsdb, const STimeWindow *tw, bool sync,bool s3Migrate);
STimeWindow win = {0};
tsdbFidKeyRange(fset->fid, rtner->tsdb->keepCfg.days, rtner->tsdb->keepCfg.precision, &win.skey, &win.ekey);
tsdbInfo("vgId:%d, async compact begin lcn: %d.", TD_VID(rtner->tsdb->pVnode), lcn);
code = tsdbAsyncCompact(rtner->tsdb, &win, pCfg->sttTrigger == 1);
code = tsdbAsyncCompact(rtner->tsdb, &win, pCfg->sttTrigger == 1, true);
tsdbInfo("vgId:%d, async compact end lcn: %d.", TD_VID(rtner->tsdb->pVnode), lcn);
goto _exit;
return code;