Merge pull request #14494 from taosdata/feature/TD-11274-3.0

enh: code and test case optimization
This commit is contained in:
Cary Xu 2022-07-04 14:50:54 +08:00 committed by GitHub
commit 9a484c4aac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 5 deletions

View File

@ -915,9 +915,9 @@ static int32_t tdRSmaQTaskInfoItemRestore(SSma *pSma, const SRSmaQTaskInfoItem *
return TSDB_CODE_SUCCESS; return TSDB_CODE_SUCCESS;
} }
if (pItem->type == 1) { if (pItem->type == TSDB_RETENTION_L1) {
qTaskInfo = pRSmaInfo->items[0].taskInfo; qTaskInfo = pRSmaInfo->items[0].taskInfo;
} else if (pItem->type == 2) { } else if (pItem->type == TSDB_RETENTION_L2) {
qTaskInfo = pRSmaInfo->items[1].taskInfo; qTaskInfo = pRSmaInfo->items[1].taskInfo;
} else { } else {
ASSERT(0); ASSERT(0);
@ -1233,7 +1233,6 @@ static void tdRSmaPersistTask(SRSmaStat *pRSmaStat) {
} else { } else {
smaWarn("vgId:%d, persist task in abnormal stat %" PRIi8, SMA_VID(pRSmaStat->pSma), smaWarn("vgId:%d, persist task in abnormal stat %" PRIi8, SMA_VID(pRSmaStat->pSma),
atomic_load_8(RSMA_TRIGGER_STAT(pRSmaStat))); atomic_load_8(RSMA_TRIGGER_STAT(pRSmaStat)));
ASSERT(0);
} }
atomic_store_8(RSMA_RUNNING_STAT(pRSmaStat), 0); atomic_store_8(RSMA_RUNNING_STAT(pRSmaStat), 0);
taosReleaseRef(smaMgmt.smaRef, pRSmaStat->refId); taosReleaseRef(smaMgmt.smaRef, pRSmaStat->refId);

View File

@ -8,8 +8,8 @@ print =============== create database
sql create database d0 keep 365000d,365000d,365000d sql create database d0 keep 365000d,365000d,365000d
sql use d0 sql use d0
print =============== create super table and register rsma print =============== create super table
sql create table if not exists stb (ts timestamp, c1 int) tags (city binary(20),district binary(20)) rollup(min); sql create table if not exists stb (ts timestamp, c1 int) tags (city binary(20),district binary(20));
sql show stables sql show stables
if $rows != 1 then if $rows != 1 then