Merge branch '3.0' of https://github.com/taosdata/TDengine into enh/tsdb_optimize

This commit is contained in:
Hongze Cheng 2023-05-17 11:45:52 +08:00
commit 7fd5de25e3
7 changed files with 40 additions and 37 deletions

View File

@ -449,6 +449,7 @@ static void *tscCrashReportThreadFp(void *param) {
tscError("failed to send crash report");
if (pFile) {
taosReleaseCrashLogFile(pFile, false);
pFile = NULL;
continue;
}
} else {
@ -468,6 +469,7 @@ static void *tscCrashReportThreadFp(void *param) {
if (pFile) {
taosReleaseCrashLogFile(pFile, truncateFile);
pFile = NULL;
truncateFile = false;
}

View File

@ -91,6 +91,7 @@ static void *dmCrashReportThreadFp(void *param) {
dError("failed to send crash report");
if (pFile) {
taosReleaseCrashLogFile(pFile, false);
pFile = NULL;
continue;
}
} else {
@ -110,6 +111,7 @@ static void *dmCrashReportThreadFp(void *param) {
if (pFile) {
taosReleaseCrashLogFile(pFile, truncateFile);
pFile = NULL;
truncateFile = false;
}

View File

@ -1306,7 +1306,7 @@ int32_t mndPauseAllStreamTasks(STrans *pTrans, SStreamObj *pStream) {
int32_t sz = taosArrayGetSize(pTasks);
for (int32_t j = 0; j < sz; j++) {
SStreamTask *pTask = taosArrayGetP(pTasks, j);
if (mndPauseStreamTask(pTrans, pTask) < 0) {
if (pTask->taskLevel == TASK_LEVEL__SOURCE && mndPauseStreamTask(pTrans, pTask) < 0) {
return -1;
}
}
@ -1430,7 +1430,7 @@ int32_t mndResumeAllStreamTasks(STrans *pTrans, SStreamObj *pStream, int8_t igUn
int32_t sz = taosArrayGetSize(pTasks);
for (int32_t j = 0; j < sz; j++) {
SStreamTask *pTask = taosArrayGetP(pTasks, j);
if (mndResumeStreamTask(pTrans, pTask, igUntreated) < 0) {
if (pTask->taskLevel == TASK_LEVEL__SOURCE && mndResumeStreamTask(pTrans, pTask, igUntreated) < 0) {
return -1;
}
}

View File

@ -894,8 +894,10 @@ void destroyTimeSliceOperatorInfo(void* param) {
}
taosArrayDestroy(pInfo->pLinearInfo);
taosMemoryFree(pInfo->pPrevGroupKey->pData);
taosMemoryFree(pInfo->pPrevGroupKey);
if (pInfo->pPrevGroupKey) {
taosMemoryFree(pInfo->pPrevGroupKey->pData);
taosMemoryFree(pInfo->pPrevGroupKey);
}
cleanupExprSupp(&pInfo->scalarSup);

View File

@ -35,7 +35,7 @@ static int32_t streamTaskExecImpl(SStreamTask* pTask, const void* data, SArray*
while (pTask->taskLevel == TASK_LEVEL__SOURCE) {
int8_t status = atomic_load_8(&pTask->status.taskStatus);
if (status != TASK_STATUS__NORMAL) {
if (status != TASK_STATUS__NORMAL && status != TASK_STATUS__PAUSE) {
qError("stream task wait for the end of fill history, s-task:%s, status:%d", pTask->id.idStr,
atomic_load_8(&pTask->status.taskStatus));
taosMsleep(2);
@ -408,7 +408,7 @@ int32_t streamTryExec(SStreamTask* pTask) {
atomic_store_8(&pTask->status.schedStatus, TASK_SCHED_STATUS__INACTIVE);
qDebug("s-task:%s exec completed", pTask->id.idStr);
if (!taosQueueEmpty(pTask->inputQueue->queue) && (!streamTaskShouldStop(&pTask->status))) {
if (!taosQueueEmpty(pTask->inputQueue->queue) && (!streamTaskShouldStop(&pTask->status)) && (!streamTaskShouldPause(&pTask->status))) {
streamSchedExec(pTask);
}
}

View File

@ -657,36 +657,33 @@ if $data20 != null then
return -1
endi
#print =============== error for normal table
#sql create table tb2023(ts timestamp, f int);
#sql_error alter table tb2023 add column v varchar(65535);
#sql_error alter table tb2023 add column v varchar(65535);
#sql_error alter table tb2023 add column v varchar(65530);
#sql alter table tb2023 add column v varchar(16374);
#sql_error alter table tb2023 modify column v varchar(65536);
#sql desc tb2023
#sql alter table tb2023 drop column v
#sql_error alter table tb2023 add column v nchar(16384);
#sql alter table tb2023 add column v nchar(4093);
#sql_error alter table tb2023 modify column v nchar(16384);
#sql_error alter table tb2023 add column v nchar(16384);
#sql alter table tb2023 drop column v
#sql alter table tb2023 add column v nchar(16374);
#sql desc tb2023
#
#print =============== error for super table
#sql create table stb2023(ts timestamp, f int) tags(t1 int);
#sql_error alter table stb2023 add column v varchar(65535);
#sql_error alter table stb2023 add column v varchar(65536);
#sql_error alter table stb2023 add column v varchar(33100);
#sql alter table stb2023 add column v varchar(16374);
#sql_error alter table stb2023 modify column v varchar(16375);
#sql desc stb2023
#sql alter table stb2023 drop column v
#sql_error alter table stb2023 add column v nchar(4094);
#sql alter table stb2023 add column v nchar(4093);
#sql_error alter table stb2023 modify column v nchar(4094);
#sql desc stb2023
print =============== error for normal table
sql create table tb2023(ts timestamp, f int);
sql_error alter table tb2023 add column v varchar(65518);
sql_error alter table tb2023 add column v varchar(65531);
sql_error alter table tb2023 add column v varchar(65535);
sql alter table tb2023 add column v varchar(65517);
sql_error alter table tb2023 modify column v varchar(65518);
sql desc tb2023
sql alter table tb2023 drop column v
sql_error alter table tb2023 add column v nchar(16380);
sql alter table tb2023 add column v nchar(16379);
sql_error alter table tb2023 modify column v nchar(16380);
sql desc tb2023
print =============== error for super table
sql create table stb2023(ts timestamp, f int) tags(t1 int);
sql_error alter table stb2023 add column v varchar(65518);
sql_error alter table stb2023 add column v varchar(65531);
sql_error alter table stb2023 add column v varchar(65535);
sql alter table stb2023 add column v varchar(65517);
sql_error alter table stb2023 modify column v varchar(65518);
sql desc stb2023
sql alter table stb2023 drop column v
sql_error alter table stb2023 add column v nchar(16380);
sql alter table stb2023 add column v nchar(16379);
sql_error alter table stb2023 modify column v nchar(16380);
sql desc stb2023
print ======= over
sql drop database d1

View File

@ -48,7 +48,7 @@ sql_error alter table tb modify column c2 binary(10);
sql_error alter table tb modify column c2 binary(9);
sql_error alter table tb modify column c2 binary(-9);
sql_error alter table tb modify column c2 binary(0);
sql_error alter table tb modify column c2 binary(65600);
sql_error alter table tb modify column c2 binary(65436);
sql_error alter table tb modify column c2 nchar(30);
sql_error alter table tb modify column c3 double;
sql_error alter table tb modify column c3 nchar(10);