Skip to content

Commit

Permalink
enh(s3/evict): evict cache data files for other migrated head, stt, etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenkgu committed Aug 28, 2023
1 parent cd3702e commit 1961e10
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions source/dnode/vnode/src/tsdb/tsdbRetention.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,17 @@ static int32_t tsdbDoRetention2(void *arg) {
code = tsdbMigrateDataFileS3(rtner, fobj, &did);
TSDB_CHECK_CODE(code, lino, _exit);
} else {
if (tsS3Enabled) {
int64_t fsize = 0;
if (taosStatFile(fobj->fname, &fsize, NULL, NULL) < 0) {
code = TAOS_SYSTEM_ERROR(terrno);
tsdbError("vgId:%d %s failed since file:%s stat failed, reason:%s", TD_VID(fs->tsdb->pVnode), __func__,
fobj->fname, tstrerror(code));
TSDB_CHECK_CODE(code, lino, _exit);
}
s3EvictCache(fobj->fname, fsize * 2);
}

code = tsdbDoMigrateFileObj(rtner, fobj, &did);
TSDB_CHECK_CODE(code, lino, _exit);
}
Expand Down

0 comments on commit 1961e10

Please sign in to comment.