refactor: adjust some logs (#30245)
* refactor: adjust wal log infos * refactor: adjust some log's level * refactor: adjust some log's level * fix: add traceId for sync module * refactor: adjust log level * refactor: adjust log level * refactor: adjust log levels * refactor: adjust log levels * refactor: adjust log levels * refactor: adjust log levels * refactor: adjust log levels * refactor: adjust log levels * refactor: adjust log levels * docs: update keywords * fix: compile errors in windows * docs: minor changes * docs: minor changes * refactor: minor changes * docs: fminro changes * docs: format * refactr: remove uncessory logs * docs: format doc
This commit is contained in:
parent
789f36edda
commit
d02196a231
|
@ -64,7 +64,7 @@ CREATE TOPIC [IF NOT EXISTS] topic_name [with meta] AS DATABASE db_name;
|
||||||
|
|
||||||
## 删除主题
|
## 删除主题
|
||||||
|
|
||||||
如果不再需要订阅数据,可以删除 topic,如果当前 topic 被消费者订阅,通过 FORCE 语法可强制删除,强制删除后订阅的消费者会消费数据会出错(FORCE 语法3.3.6.0版本开始支持)。
|
如果不再需要订阅数据,可以删除 topic,如果当前 topic 被消费者订阅,通过 FORCE 语法可强制删除,强制删除后订阅的消费者会消费数据会出错(FORCE 语法从 v3.3.6.0 开始支持)。
|
||||||
|
|
||||||
```sql
|
```sql
|
||||||
DROP TOPIC [IF EXISTS] [FORCE] topic_name;
|
DROP TOPIC [IF EXISTS] [FORCE] topic_name;
|
||||||
|
@ -94,7 +94,7 @@ SHOW CONSUMERS;
|
||||||
|
|
||||||
### 删除消费组
|
### 删除消费组
|
||||||
|
|
||||||
消费者创建的时候,会给消费者指定一个消费者组,消费者不能显式的删除,但是可以删除消费者组。如果当前消费者组里有消费者在消费,通过 FORCE 语法可强制删除,强制删除后订阅的消费者会消费数据会出错(FORCE 语法3.3.6.0版本开始支持)。
|
消费者创建的时候,会给消费者指定一个消费者组,消费者不能显式的删除,但是可以删除消费者组。如果当前消费者组里有消费者在消费,通过 FORCE 语法可强制删除,强制删除后订阅的消费者会消费数据会出错(FORCE 语法从 v3.3.6.0 开始支持)。
|
||||||
```sql
|
```sql
|
||||||
DROP CONSUMER GROUP [IF EXISTS] [FORCE] cgroup_name ON topic_name;
|
DROP CONSUMER GROUP [IF EXISTS] [FORCE] cgroup_name ON topic_name;
|
||||||
```
|
```
|
||||||
|
|
|
@ -7,14 +7,6 @@ sidebar_label: "LSTM"
|
||||||
|
|
||||||
## 功能概述
|
## 功能概述
|
||||||
|
|
||||||
LSTM模型即长短期记忆网络(Long Short Term Memory),是一种特殊的循环神经网络,适用于处理时间序列数据、自然语言处理等任务,通过其独特的门控机制,能够有效捕捉长期依赖关系,
|
|
||||||
解决传统RNN的梯度消失问题,从而对序列数据进行准确预测,不过它不直接提供计算的置信区间范围结果。
|
|
||||||
|
|
||||||
|
|
||||||
完整的调用SQL语句如下:
|
|
||||||
```SQL
|
|
||||||
SELECT _frowts, FORECAST(i32, "algo=lstm") from foo
|
|
||||||
=======
|
|
||||||
LSTM 模型即长短期记忆网络(Long Short Term Memory),是一种特殊的循环神经网络,适用于处理时间序列数据、自然语言处理等任务,通过其独特的门控机制,能够有效捕捉长期依赖关系,
|
LSTM 模型即长短期记忆网络(Long Short Term Memory),是一种特殊的循环神经网络,适用于处理时间序列数据、自然语言处理等任务,通过其独特的门控机制,能够有效捕捉长期依赖关系,
|
||||||
解决传统 RNN 的梯度消失问题,从而对序列数据进行准确预测,不过它不直接提供计算的置信区间范围结果。
|
解决传统 RNN 的梯度消失问题,从而对序列数据进行准确预测,不过它不直接提供计算的置信区间范围结果。
|
||||||
|
|
||||||
|
@ -22,7 +14,6 @@ LSTM 模型即长短期记忆网络(Long Short Term Memory),是一种特殊的
|
||||||
完整的调用 SQL 语句如下:
|
完整的调用 SQL 语句如下:
|
||||||
```SQL
|
```SQL
|
||||||
SELECT _frowts, FORECAST(i32, "algo=lstm,alpha=95,period=10,start_p=1,max_p=5,start_q=1,max_q=5") from foo
|
SELECT _frowts, FORECAST(i32, "algo=lstm,alpha=95,period=10,start_p=1,max_p=5,start_q=1,max_q=5") from foo
|
||||||
>>>>>>> 3.0
|
|
||||||
```
|
```
|
||||||
|
|
||||||
```json5
|
```json5
|
||||||
|
|
|
@ -23,7 +23,7 @@ SELECT _frowts, FORECAST(i32, "algo=mlp") from foo
|
||||||
"rows": fc_rows, // 返回结果的行数
|
"rows": fc_rows, // 返回结果的行数
|
||||||
"period": period, // 返回结果的周期性,同输入
|
"period": period, // 返回结果的周期性,同输入
|
||||||
"alpha": alpha, // 返回结果的置信区间,同输入
|
"alpha": alpha, // 返回结果的置信区间,同输入
|
||||||
"algo": "mlp", // 返回结果使用的算法
|
"algo": "mlp", // 返回结果使用的算法
|
||||||
"mse": mse, // 拟合输入时间序列时候生成模型的最小均方误差(MSE)
|
"mse": mse, // 拟合输入时间序列时候生成模型的最小均方误差(MSE)
|
||||||
"res": res // 列模式的结果
|
"res": res // 列模式的结果
|
||||||
}
|
}
|
||||||
|
|
|
@ -559,10 +559,10 @@ static int32_t taosAnalyJsonBufWriteColData(SAnalyticBuf *pBuf, int32_t colIndex
|
||||||
break;
|
break;
|
||||||
case TSDB_DATA_TYPE_BIGINT:
|
case TSDB_DATA_TYPE_BIGINT:
|
||||||
case TSDB_DATA_TYPE_TIMESTAMP:
|
case TSDB_DATA_TYPE_TIMESTAMP:
|
||||||
bufLen += tsnprintf(buf + bufLen, sizeof(buf) - bufLen, "%" PRId64 "", *(int64_t *)colValue);
|
bufLen += tsnprintf(buf + bufLen, sizeof(buf) - bufLen, "%" PRId64, *(int64_t *)colValue);
|
||||||
break;
|
break;
|
||||||
case TSDB_DATA_TYPE_UBIGINT:
|
case TSDB_DATA_TYPE_UBIGINT:
|
||||||
bufLen += tsnprintf(buf + bufLen, sizeof(buf) - bufLen, "%" PRIu64 "", *(uint64_t *)colValue);
|
bufLen += tsnprintf(buf + bufLen, sizeof(buf) - bufLen, "%" PRIu64, *(uint64_t *)colValue);
|
||||||
break;
|
break;
|
||||||
case TSDB_DATA_TYPE_FLOAT:
|
case TSDB_DATA_TYPE_FLOAT:
|
||||||
bufLen += tsnprintf(buf + bufLen, sizeof(buf) - bufLen, "%f", GET_FLOAT_VAL(colValue));
|
bufLen += tsnprintf(buf + bufLen, sizeof(buf) - bufLen, "%f", GET_FLOAT_VAL(colValue));
|
||||||
|
|
|
@ -48,10 +48,10 @@ static void dmUpdateDnodeCfg(SDnodeMgmt *pMgmt, SDnodeCfg *pCfg) {
|
||||||
|
|
||||||
static void dmMayShouldUpdateIpWhiteList(SDnodeMgmt *pMgmt, int64_t ver) {
|
static void dmMayShouldUpdateIpWhiteList(SDnodeMgmt *pMgmt, int64_t ver) {
|
||||||
int32_t code = 0;
|
int32_t code = 0;
|
||||||
dDebug("ip-white-list on dnode ver: %" PRId64 ", status ver: %" PRId64 "", pMgmt->pData->ipWhiteVer, ver);
|
dDebug("ip-white-list on dnode ver: %" PRId64 ", status ver: %" PRId64, pMgmt->pData->ipWhiteVer, ver);
|
||||||
if (pMgmt->pData->ipWhiteVer == ver) {
|
if (pMgmt->pData->ipWhiteVer == ver) {
|
||||||
if (ver == 0) {
|
if (ver == 0) {
|
||||||
dDebug("disable ip-white-list on dnode ver: %" PRId64 ", status ver: %" PRId64 "", pMgmt->pData->ipWhiteVer, ver);
|
dDebug("disable ip-white-list on dnode ver: %" PRId64 ", status ver: %" PRId64, pMgmt->pData->ipWhiteVer, ver);
|
||||||
if (rpcSetIpWhite(pMgmt->msgCb.serverRpc, NULL) != 0) {
|
if (rpcSetIpWhite(pMgmt->msgCb.serverRpc, NULL) != 0) {
|
||||||
dError("failed to disable ip white list on dnode");
|
dError("failed to disable ip white list on dnode");
|
||||||
}
|
}
|
||||||
|
|
|
@ -1183,7 +1183,7 @@ int64_t mndStreamGenChkptId(SMnode *pMnode, bool lock) {
|
||||||
if (pIter == NULL) break;
|
if (pIter == NULL) break;
|
||||||
|
|
||||||
maxChkptId = TMAX(maxChkptId, pStream->checkpointId);
|
maxChkptId = TMAX(maxChkptId, pStream->checkpointId);
|
||||||
mDebug("stream:%p, %s id:0x%" PRIx64 " checkpoint %" PRId64 "", pStream, pStream->name, pStream->uid,
|
mDebug("stream:%p, %s id:0x%" PRIx64 " checkpoint %" PRId64, pStream, pStream->name, pStream->uid,
|
||||||
pStream->checkpointId);
|
pStream->checkpointId);
|
||||||
sdbRelease(pSdb, pStream);
|
sdbRelease(pSdb, pStream);
|
||||||
}
|
}
|
||||||
|
@ -1257,7 +1257,7 @@ static int32_t mndProcessStreamCheckpointTrans(SMnode *pMnode, SStreamObj *pStre
|
||||||
goto _ERR;
|
goto _ERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
mDebug("start to trigger checkpoint for stream:%s, checkpoint: %" PRId64 "", pStream->name, checkpointId);
|
mDebug("start to trigger checkpoint for stream:%s, checkpoint: %" PRId64, pStream->name, checkpointId);
|
||||||
|
|
||||||
taosWLockLatch(&pStream->lock);
|
taosWLockLatch(&pStream->lock);
|
||||||
pStream->currentTick = 1;
|
pStream->currentTick = 1;
|
||||||
|
|
|
@ -267,7 +267,7 @@ _over:
|
||||||
}
|
}
|
||||||
|
|
||||||
terrno = 0;
|
terrno = 0;
|
||||||
mTrace("stream:%s, encode to raw:%p, row:%p, checkpoint:%" PRId64 "", pStream->name, pRaw, pStream,
|
mTrace("stream:%s, encode to raw:%p, row:%p, checkpoint:%" PRId64, pStream->name, pRaw, pStream,
|
||||||
pStream->checkpointId);
|
pStream->checkpointId);
|
||||||
return pRaw;
|
return pRaw;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1945,7 +1945,7 @@ void mndTransExecuteImp(SMnode *pMnode, STrans *pTrans, bool topHalf) {
|
||||||
bool continueExec = true;
|
bool continueExec = true;
|
||||||
|
|
||||||
while (continueExec) {
|
while (continueExec) {
|
||||||
mInfo("trans:%d, continue to execute stage:%s in %s, createTime:%" PRId64 "", pTrans->id,
|
mInfo("trans:%d, continue to execute stage:%s in %s, createTime:%" PRId64, pTrans->id,
|
||||||
mndTransStr(pTrans->stage), mndStrExecutionContext(topHalf), pTrans->createdTime);
|
mndTransStr(pTrans->stage), mndStrExecutionContext(topHalf), pTrans->createdTime);
|
||||||
pTrans->lastExecTime = taosGetTimestampMs();
|
pTrans->lastExecTime = taosGetTimestampMs();
|
||||||
switch (pTrans->stage) {
|
switch (pTrans->stage) {
|
||||||
|
|
|
@ -338,7 +338,7 @@ int64_t mndGetIpWhiteVer(SMnode *pMnode) {
|
||||||
if (mndEnableIpWhiteList(pMnode) == 0 || tsEnableWhiteList == false) {
|
if (mndEnableIpWhiteList(pMnode) == 0 || tsEnableWhiteList == false) {
|
||||||
ver = 0;
|
ver = 0;
|
||||||
}
|
}
|
||||||
mDebug("ip-white-list on mnode ver: %" PRId64 "", ver);
|
mDebug("ip-white-list on mnode ver: %" PRId64, ver);
|
||||||
return ver;
|
return ver;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1524,7 +1524,7 @@ int32_t metaGetTableTagsByUids(void *pVnode, int64_t suid, SArray *uidList) {
|
||||||
memcpy(p->pTagVal, val, len);
|
memcpy(p->pTagVal, val, len);
|
||||||
tdbFree(val);
|
tdbFree(val);
|
||||||
} else {
|
} else {
|
||||||
metaError("vgId:%d, failed to table tags, suid: %" PRId64 ", uid: %" PRId64 "", TD_VID(pMeta->pVnode), suid,
|
metaError("vgId:%d, failed to table tags, suid: %" PRId64 ", uid: %" PRId64, TD_VID(pMeta->pVnode), suid,
|
||||||
p->uid);
|
p->uid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -457,7 +457,7 @@ static int32_t tdRsmaStopExecutor(const SSma *pSma) {
|
||||||
|
|
||||||
for (int32_t i = 0; i < tsNumOfVnodeRsmaThreads; ++i) {
|
for (int32_t i = 0; i < tsNumOfVnodeRsmaThreads; ++i) {
|
||||||
if (taosCheckPthreadValid(pthread[i])) {
|
if (taosCheckPthreadValid(pthread[i])) {
|
||||||
smaDebug("vgId:%d, start to join pthread for rsma:%" PRId64 "", SMA_VID(pSma), taosGetPthreadId(pthread[i]));
|
smaDebug("vgId:%d, start to join pthread for rsma:%" PRId64, SMA_VID(pSma), taosGetPthreadId(pthread[i]));
|
||||||
(void)taosThreadJoin(pthread[i], NULL);
|
(void)taosThreadJoin(pthread[i], NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -736,7 +736,7 @@ int32_t tqProcessSubscribeReq(STQ* pTq, int64_t sversion, char* msg, int32_t msg
|
||||||
req.vgId, req.subKey, req.newConsumerId, req.oldConsumerId);
|
req.vgId, req.subKey, req.newConsumerId, req.oldConsumerId);
|
||||||
}
|
}
|
||||||
if (req.newConsumerId == -1) {
|
if (req.newConsumerId == -1) {
|
||||||
tqError("vgId:%d, tq invalid rebalance request, new consumerId %" PRId64 "", req.vgId, req.newConsumerId);
|
tqError("vgId:%d, tq invalid rebalance request, new consumerId %" PRId64, req.vgId, req.newConsumerId);
|
||||||
ret = TSDB_CODE_INVALID_PARA;
|
ret = TSDB_CODE_INVALID_PARA;
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
|
@ -565,7 +565,7 @@ bool tqNextBlockImpl(STqReader* pReader, const char* idstr) {
|
||||||
void* ret = taosHashGet(pReader->tbIdHash, &pSubmitTbData->uid, sizeof(int64_t));
|
void* ret = taosHashGet(pReader->tbIdHash, &pSubmitTbData->uid, sizeof(int64_t));
|
||||||
TSDB_CHECK_CONDITION(ret == NULL, code, lino, END, true);
|
TSDB_CHECK_CONDITION(ret == NULL, code, lino, END, true);
|
||||||
|
|
||||||
tqTrace("iterator data block in hash jump block, progress:%d/%d, uid:%" PRId64 "", pReader->nextBlk, blockSz, uid);
|
tqTrace("iterator data block in hash jump block, progress:%d/%d, uid:%" PRId64, pReader->nextBlk, blockSz, uid);
|
||||||
pReader->nextBlk++;
|
pReader->nextBlk++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -593,7 +593,7 @@ bool tqNextDataBlockFilterOut(STqReader* pReader, SHashObj* filterOutUids) {
|
||||||
uid = pSubmitTbData->uid;
|
uid = pSubmitTbData->uid;
|
||||||
void* ret = taosHashGet(filterOutUids, &pSubmitTbData->uid, sizeof(int64_t));
|
void* ret = taosHashGet(filterOutUids, &pSubmitTbData->uid, sizeof(int64_t));
|
||||||
TSDB_CHECK_NULL(ret, code, lino, END, true);
|
TSDB_CHECK_NULL(ret, code, lino, END, true);
|
||||||
tqTrace("iterator data block in hash jump block, progress:%d/%d, uid:%" PRId64 "", pReader->nextBlk, blockSz, uid);
|
tqTrace("iterator data block in hash jump block, progress:%d/%d, uid:%" PRId64, pReader->nextBlk, blockSz, uid);
|
||||||
pReader->nextBlk++;
|
pReader->nextBlk++;
|
||||||
}
|
}
|
||||||
tqReaderClearSubmitMsg(pReader);
|
tqReaderClearSubmitMsg(pReader);
|
||||||
|
@ -1848,7 +1848,7 @@ bool tqNextVTableSourceBlockImpl(STqReader* pReader, const char* idstr) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tqTrace("iterator data block in hash jump block, progress:%d/%d, uid:%" PRId64 "", pReader->nextBlk, blockSz,
|
tqTrace("iterator data block in hash jump block, progress:%d/%d, uid:%" PRId64, pReader->nextBlk, blockSz,
|
||||||
pTbUid);
|
pTbUid);
|
||||||
pReader->nextBlk++;
|
pReader->nextBlk++;
|
||||||
}
|
}
|
||||||
|
|
|
@ -617,7 +617,7 @@ int32_t vnodeProcessWriteMsg(SVnode *pVnode, SRpcMsg *pMsg, int64_t ver, SRpcMsg
|
||||||
(void)taosThreadMutexUnlock(&pVnode->mutex);
|
(void)taosThreadMutexUnlock(&pVnode->mutex);
|
||||||
|
|
||||||
if (ver <= pVnode->state.applied) {
|
if (ver <= pVnode->state.applied) {
|
||||||
vError("vgId:%d, duplicate write request. ver: %" PRId64 ", applied: %" PRId64 "", TD_VID(pVnode), ver,
|
vError("vgId:%d, duplicate write request. ver: %" PRId64 ", applied: %" PRId64, TD_VID(pVnode), ver,
|
||||||
pVnode->state.applied);
|
pVnode->state.applied);
|
||||||
return terrno = TSDB_CODE_VND_DUP_REQUEST;
|
return terrno = TSDB_CODE_VND_DUP_REQUEST;
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,7 +98,7 @@ static int32_t toDataCacheEntry(SDataDeleterHandle* pHandle, const SInputData* p
|
||||||
pRes->ekey = pHandle->pDeleter->deleteTimeRange.ekey;
|
pRes->ekey = pHandle->pDeleter->deleteTimeRange.ekey;
|
||||||
}
|
}
|
||||||
|
|
||||||
qDebug("delete %" PRId64 " rows, from %" PRId64 " to %" PRId64 "", pRes->affectedRows, pRes->skey, pRes->ekey);
|
qDebug("delete %" PRId64 " rows, from %" PRId64 " to %" PRId64, pRes->affectedRows, pRes->skey, pRes->ekey);
|
||||||
|
|
||||||
pBuf->useSize += pEntry->dataLen;
|
pBuf->useSize += pEntry->dataLen;
|
||||||
|
|
||||||
|
|
|
@ -3340,7 +3340,7 @@ static int32_t doQueueScanNext(SOperatorInfo* pOperator, SSDataBlock** ppRes) {
|
||||||
bool hasPrimaryKey = pAPI->tqReaderFn.tqGetTablePrimaryKey(pInfo->tqReader);
|
bool hasPrimaryKey = pAPI->tqReaderFn.tqGetTablePrimaryKey(pInfo->tqReader);
|
||||||
code = processPrimaryKey(pResult, hasPrimaryKey, &pTaskInfo->streamInfo.currentOffset);
|
code = processPrimaryKey(pResult, hasPrimaryKey, &pTaskInfo->streamInfo.currentOffset);
|
||||||
QUERY_CHECK_CODE(code, lino, _end);
|
QUERY_CHECK_CODE(code, lino, _end);
|
||||||
qDebug("tmqsnap doQueueScan get data utid:%" PRId64 "", pResult->info.id.uid);
|
qDebug("tmqsnap doQueueScan get data utid:%" PRId64, pResult->info.id.uid);
|
||||||
if (pResult->info.rows > 0) {
|
if (pResult->info.rows > 0) {
|
||||||
(*ppRes) = pResult;
|
(*ppRes) = pResult;
|
||||||
return code;
|
return code;
|
||||||
|
@ -3355,7 +3355,7 @@ static int32_t doQueueScanNext(SOperatorInfo* pOperator, SSDataBlock** ppRes) {
|
||||||
|
|
||||||
pTSInfo->base.dataReader = NULL;
|
pTSInfo->base.dataReader = NULL;
|
||||||
int64_t validVer = pTaskInfo->streamInfo.snapshotVer + 1;
|
int64_t validVer = pTaskInfo->streamInfo.snapshotVer + 1;
|
||||||
qDebug("queue scan tsdb over, switch to wal ver %" PRId64 "", validVer);
|
qDebug("queue scan tsdb over, switch to wal ver %" PRId64, validVer);
|
||||||
if (pAPI->tqReaderFn.tqReaderSeek(pInfo->tqReader, validVer, pTaskInfo->id.str) < 0) {
|
if (pAPI->tqReaderFn.tqReaderSeek(pInfo->tqReader, validVer, pTaskInfo->id.str) < 0) {
|
||||||
(*ppRes) = NULL;
|
(*ppRes) = NULL;
|
||||||
return code;
|
return code;
|
||||||
|
@ -4316,7 +4316,7 @@ static int32_t doRawScanNext(SOperatorInfo* pOperator, SSDataBlock** ppRes) {
|
||||||
bool hasPrimaryKey = pAPI->snapshotFn.taosXGetTablePrimaryKey(pInfo->sContext);
|
bool hasPrimaryKey = pAPI->snapshotFn.taosXGetTablePrimaryKey(pInfo->sContext);
|
||||||
code = processPrimaryKey(pBlock, hasPrimaryKey, &pTaskInfo->streamInfo.currentOffset);
|
code = processPrimaryKey(pBlock, hasPrimaryKey, &pTaskInfo->streamInfo.currentOffset);
|
||||||
QUERY_CHECK_CODE(code, lino, _end);
|
QUERY_CHECK_CODE(code, lino, _end);
|
||||||
qDebug("tmqsnap doRawScan get data uid:%" PRId64 "", pBlock->info.id.uid);
|
qDebug("tmqsnap doRawScan get data uid:%" PRId64, pBlock->info.id.uid);
|
||||||
(*ppRes) = pBlock;
|
(*ppRes) = pBlock;
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
@ -4336,7 +4336,7 @@ static int32_t doRawScanNext(SOperatorInfo* pOperator, SSDataBlock** ppRes) {
|
||||||
} else {
|
} else {
|
||||||
SValue val = {0};
|
SValue val = {0};
|
||||||
tqOffsetResetToData(&offset, mtInfo.uid, INT64_MIN, val);
|
tqOffsetResetToData(&offset, mtInfo.uid, INT64_MIN, val);
|
||||||
qDebug("tmqsnap change get data uid:%" PRId64 "", mtInfo.uid);
|
qDebug("tmqsnap change get data uid:%" PRId64, mtInfo.uid);
|
||||||
}
|
}
|
||||||
destroyMetaTableInfo(&mtInfo);
|
destroyMetaTableInfo(&mtInfo);
|
||||||
code = qStreamPrepareScan(pTaskInfo, &offset, pInfo->sContext->subType);
|
code = qStreamPrepareScan(pTaskInfo, &offset, pInfo->sContext->subType);
|
||||||
|
|
|
@ -790,7 +790,7 @@ static int64_t idxGetAvailableVer(SIndex* sIdx, IndexCache* cache) {
|
||||||
|
|
||||||
if (rd != NULL) {
|
if (rd != NULL) {
|
||||||
ver = (ver > rd->header.version ? ver : rd->header.version) + 1;
|
ver = (ver > rd->header.version ? ver : rd->header.version) + 1;
|
||||||
indexInfo("header: %" PRId64 ", ver: %" PRId64 "", rd->header.version, ver);
|
indexInfo("header: %" PRId64 ", ver: %" PRId64, rd->header.version, ver);
|
||||||
}
|
}
|
||||||
tfileReaderUnRef(rd);
|
tfileReaderUnRef(rd);
|
||||||
return ver;
|
return ver;
|
||||||
|
@ -799,7 +799,7 @@ static int32_t idxGenTFile(SIndex* sIdx, IndexCache* cache, SArray* batch) {
|
||||||
int32_t code = 0;
|
int32_t code = 0;
|
||||||
|
|
||||||
int64_t version = idxGetAvailableVer(sIdx, cache);
|
int64_t version = idxGetAvailableVer(sIdx, cache);
|
||||||
indexInfo("file name version: %" PRId64 "", version);
|
indexInfo("file name version: %" PRId64, version);
|
||||||
|
|
||||||
TFileWriter* tw = NULL;
|
TFileWriter* tw = NULL;
|
||||||
|
|
||||||
|
|
|
@ -603,7 +603,7 @@ int32_t tfileReaderOpen(SIndex* idx, uint64_t suid, int64_t version, const char*
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
wc->lru = idx->lru;
|
wc->lru = idx->lru;
|
||||||
indexTrace("open read file name:%s, file size: %" PRId64 "", wc->file.buf, wc->file.size);
|
indexTrace("open read file name:%s, file size: %" PRId64, wc->file.buf, wc->file.size);
|
||||||
|
|
||||||
return tfileReaderCreate(wc, pReader);
|
return tfileReaderCreate(wc, pReader);
|
||||||
}
|
}
|
||||||
|
@ -787,7 +787,7 @@ int idxTFileSearch(void* tfile, SIndexTermQuery* query, SIdxTRslt* result) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
int64_t cost = taosGetTimestampUs() - st;
|
int64_t cost = taosGetTimestampUs() - st;
|
||||||
indexInfo("index tfile stage 1 cost: %" PRId64 "", cost);
|
indexInfo("index tfile stage 1 cost: %" PRId64, cost);
|
||||||
|
|
||||||
return tfileReaderSearch(reader, query, result);
|
return tfileReaderSearch(reader, query, result);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3357,7 +3357,7 @@ static int32_t rewriteQueryTimeFunc(STranslateContext* pCxt, int64_t val, SNode*
|
||||||
if (NULL == pStr) {
|
if (NULL == pStr) {
|
||||||
return terrno;
|
return terrno;
|
||||||
}
|
}
|
||||||
snprintf(pStr, 20, "%" PRId64 "", val);
|
snprintf(pStr, 20, "%" PRId64, val);
|
||||||
int32_t code = rewriteFuncToValue(pCxt, &pStr, pNode);
|
int32_t code = rewriteFuncToValue(pCxt, &pStr, pNode);
|
||||||
if (TSDB_CODE_SUCCESS != code) taosMemoryFree(pStr);
|
if (TSDB_CODE_SUCCESS != code) taosMemoryFree(pStr);
|
||||||
return code;
|
return code;
|
||||||
|
|
|
@ -4078,7 +4078,7 @@ static int32_t rewriteUniqueOptCreateFirstFunc(SFunctionNode* pSelectValue, SNod
|
||||||
} else {
|
} else {
|
||||||
int64_t pointer = (int64_t)pFunc;
|
int64_t pointer = (int64_t)pFunc;
|
||||||
char name[TSDB_FUNC_NAME_LEN + TSDB_POINTER_PRINT_BYTES + TSDB_NAME_DELIMITER_LEN + 1] = {0};
|
char name[TSDB_FUNC_NAME_LEN + TSDB_POINTER_PRINT_BYTES + TSDB_NAME_DELIMITER_LEN + 1] = {0};
|
||||||
int32_t len = tsnprintf(name, sizeof(name) - 1, "%s.%" PRId64 "", pFunc->functionName, pointer);
|
int32_t len = tsnprintf(name, sizeof(name) - 1, "%s.%" PRId64, pFunc->functionName, pointer);
|
||||||
(void)taosHashBinary(name, len);
|
(void)taosHashBinary(name, len);
|
||||||
tstrncpy(pFunc->node.aliasName, name, TSDB_COL_NAME_LEN);
|
tstrncpy(pFunc->node.aliasName, name, TSDB_COL_NAME_LEN);
|
||||||
}
|
}
|
||||||
|
@ -7521,7 +7521,7 @@ static int32_t tsmaOptCreateWStart(int8_t precision, SFunctionNode** pWStartOut)
|
||||||
tstrncpy(pWStart->functionName, "_wstart", TSDB_FUNC_NAME_LEN);
|
tstrncpy(pWStart->functionName, "_wstart", TSDB_FUNC_NAME_LEN);
|
||||||
int64_t pointer = (int64_t)pWStart;
|
int64_t pointer = (int64_t)pWStart;
|
||||||
char name[TSDB_COL_NAME_LEN + TSDB_POINTER_PRINT_BYTES + TSDB_NAME_DELIMITER_LEN + 1] = {0};
|
char name[TSDB_COL_NAME_LEN + TSDB_POINTER_PRINT_BYTES + TSDB_NAME_DELIMITER_LEN + 1] = {0};
|
||||||
int32_t len = tsnprintf(name, sizeof(name) - 1, "%s.%" PRId64 "", pWStart->functionName, pointer);
|
int32_t len = tsnprintf(name, sizeof(name) - 1, "%s.%" PRId64, pWStart->functionName, pointer);
|
||||||
(void)taosHashBinary(name, len);
|
(void)taosHashBinary(name, len);
|
||||||
tstrncpy(pWStart->node.aliasName, name, TSDB_COL_NAME_LEN);
|
tstrncpy(pWStart->node.aliasName, name, TSDB_COL_NAME_LEN);
|
||||||
pWStart->node.resType.precision = precision;
|
pWStart->node.resType.precision = precision;
|
||||||
|
|
|
@ -444,7 +444,7 @@ static int32_t stbSplAppendWStart(SNodeList* pFuncs, int32_t* pIndex, uint8_t pr
|
||||||
tstrncpy(pWStart->functionName, "_wstart", TSDB_FUNC_NAME_LEN);
|
tstrncpy(pWStart->functionName, "_wstart", TSDB_FUNC_NAME_LEN);
|
||||||
int64_t pointer = (int64_t)pWStart;
|
int64_t pointer = (int64_t)pWStart;
|
||||||
char name[TSDB_COL_NAME_LEN + TSDB_POINTER_PRINT_BYTES + TSDB_NAME_DELIMITER_LEN + 1] = {0};
|
char name[TSDB_COL_NAME_LEN + TSDB_POINTER_PRINT_BYTES + TSDB_NAME_DELIMITER_LEN + 1] = {0};
|
||||||
int32_t len = tsnprintf(name, sizeof(name) - 1, "%s.%" PRId64 "", pWStart->functionName, pointer);
|
int32_t len = tsnprintf(name, sizeof(name) - 1, "%s.%" PRId64, pWStart->functionName, pointer);
|
||||||
(void)taosHashBinary(name, len);
|
(void)taosHashBinary(name, len);
|
||||||
tstrncpy(pWStart->node.aliasName, name, TSDB_COL_NAME_LEN);
|
tstrncpy(pWStart->node.aliasName, name, TSDB_COL_NAME_LEN);
|
||||||
pWStart->node.resType.precision = precision;
|
pWStart->node.resType.precision = precision;
|
||||||
|
@ -476,7 +476,7 @@ static int32_t stbSplAppendWEnd(SWindowLogicNode* pWin, int32_t* pIndex) {
|
||||||
tstrncpy(pWEnd->functionName, "_wend", TSDB_FUNC_NAME_LEN);
|
tstrncpy(pWEnd->functionName, "_wend", TSDB_FUNC_NAME_LEN);
|
||||||
int64_t pointer = (int64_t)pWEnd;
|
int64_t pointer = (int64_t)pWEnd;
|
||||||
char name[TSDB_COL_NAME_LEN + TSDB_POINTER_PRINT_BYTES + TSDB_NAME_DELIMITER_LEN + 1] = {0};
|
char name[TSDB_COL_NAME_LEN + TSDB_POINTER_PRINT_BYTES + TSDB_NAME_DELIMITER_LEN + 1] = {0};
|
||||||
int32_t len = tsnprintf(name, sizeof(name) - 1, "%s.%" PRId64 "", pWEnd->functionName, pointer);
|
int32_t len = tsnprintf(name, sizeof(name) - 1, "%s.%" PRId64, pWEnd->functionName, pointer);
|
||||||
(void)taosHashBinary(name, len);
|
(void)taosHashBinary(name, len);
|
||||||
tstrncpy(pWEnd->node.aliasName, name, TSDB_COL_NAME_LEN);
|
tstrncpy(pWEnd->node.aliasName, name, TSDB_COL_NAME_LEN);
|
||||||
|
|
||||||
|
|
|
@ -302,7 +302,7 @@ int32_t qwGetQueryResFromSink(QW_FPARAMS_DEF, SQWTaskCtx *ctx, int32_t *dataLen,
|
||||||
QW_SINK_DISABLE_MEMPOOL();
|
QW_SINK_DISABLE_MEMPOOL();
|
||||||
|
|
||||||
if (len < 0) {
|
if (len < 0) {
|
||||||
QW_TASK_ELOG("invalid length from dsGetDataLength, length:%" PRId64 "", len);
|
QW_TASK_ELOG("invalid length from dsGetDataLength, length:%" PRId64, len);
|
||||||
QW_ERR_JRET(TSDB_CODE_QRY_INVALID_INPUT);
|
QW_ERR_JRET(TSDB_CODE_QRY_INVALID_INPUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -228,7 +228,7 @@ int32_t rebuildDirFromCheckpoint(const char* path, int64_t chkpId, char** dst) {
|
||||||
return terrno;
|
return terrno;
|
||||||
}
|
}
|
||||||
|
|
||||||
nBytes = snprintf(chkp, cap, "%s%s%s%scheckpoint%" PRId64 "", path, TD_DIRSEP, "checkpoints", TD_DIRSEP, chkpId);
|
nBytes = snprintf(chkp, cap, "%s%s%s%scheckpoint%" PRId64, path, TD_DIRSEP, "checkpoints", TD_DIRSEP, chkpId);
|
||||||
if (nBytes <= 0 || nBytes >= cap) {
|
if (nBytes <= 0 || nBytes >= cap) {
|
||||||
taosMemoryFree(state);
|
taosMemoryFree(state);
|
||||||
taosMemoryFree(chkp);
|
taosMemoryFree(chkp);
|
||||||
|
@ -349,7 +349,7 @@ int32_t remoteChkp_validAndCvtMeta(char* path, SSChkpMetaOnS3* pMeta, int64_t ch
|
||||||
goto _EXIT;
|
goto _EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
nBytes = snprintf(src, cap, "%s%s%s_%" PRId64 "", path, TD_DIRSEP, key, pMeta->currChkptId);
|
nBytes = snprintf(src, cap, "%s%s%s_%" PRId64, path, TD_DIRSEP, key, pMeta->currChkptId);
|
||||||
if (nBytes <= 0 || nBytes >= cap) {
|
if (nBytes <= 0 || nBytes >= cap) {
|
||||||
code = TSDB_CODE_OUT_OF_RANGE;
|
code = TSDB_CODE_OUT_OF_RANGE;
|
||||||
goto _EXIT;
|
goto _EXIT;
|
||||||
|
@ -402,7 +402,7 @@ int32_t remoteChkpGetDelFile(char* path, SArray* toDel) {
|
||||||
return terrno;
|
return terrno;
|
||||||
}
|
}
|
||||||
|
|
||||||
nBytes = snprintf(p, cap, "%s_%" PRId64 "", key, pMeta->currChkptId);
|
nBytes = snprintf(p, cap, "%s_%" PRId64, key, pMeta->currChkptId);
|
||||||
if (nBytes <= 0 || nBytes >= cap) {
|
if (nBytes <= 0 || nBytes >= cap) {
|
||||||
taosMemoryFree(pMeta);
|
taosMemoryFree(pMeta);
|
||||||
taosMemoryFree(p);
|
taosMemoryFree(p);
|
||||||
|
@ -752,7 +752,7 @@ int32_t restoreCheckpointData(const char* path, const char* key, int64_t chkptId
|
||||||
|
|
||||||
stDebug("%s check local backend dir:%s, checkpointId:%" PRId64 " succ", key, defaultPath, chkptId);
|
stDebug("%s check local backend dir:%s, checkpointId:%" PRId64 " succ", key, defaultPath, chkptId);
|
||||||
if (chkptId > 0) {
|
if (chkptId > 0) {
|
||||||
nBytes = snprintf(checkpointPath, cap, "%s%s%s%s%s%" PRId64 "", prefixPath, TD_DIRSEP, "checkpoints", TD_DIRSEP,
|
nBytes = snprintf(checkpointPath, cap, "%s%s%s%s%s%" PRId64, prefixPath, TD_DIRSEP, "checkpoints", TD_DIRSEP,
|
||||||
"checkpoint", chkptId);
|
"checkpoint", chkptId);
|
||||||
if (nBytes <= 0 || nBytes >= cap) {
|
if (nBytes <= 0 || nBytes >= cap) {
|
||||||
code = TSDB_CODE_OUT_OF_RANGE;
|
code = TSDB_CODE_OUT_OF_RANGE;
|
||||||
|
@ -1088,7 +1088,7 @@ int32_t delObsoleteCheckpoint(void* arg, const char* path) {
|
||||||
for (int i = 0; i < taosArrayGetSize(chkpDel); i++) {
|
for (int i = 0; i < taosArrayGetSize(chkpDel); i++) {
|
||||||
int64_t id = *(int64_t*)taosArrayGet(chkpDel, i);
|
int64_t id = *(int64_t*)taosArrayGet(chkpDel, i);
|
||||||
char tbuf[256] = {0};
|
char tbuf[256] = {0};
|
||||||
sprintf(tbuf, "%s%scheckpoint%" PRId64 "", path, TD_DIRSEP, id);
|
sprintf(tbuf, "%s%scheckpoint%" PRId64, path, TD_DIRSEP, id);
|
||||||
if (taosIsDir(tbuf)) {
|
if (taosIsDir(tbuf)) {
|
||||||
taosRemoveDir(tbuf);
|
taosRemoveDir(tbuf);
|
||||||
}
|
}
|
||||||
|
@ -1166,7 +1166,7 @@ int32_t chkpMayDelObsolete(void* arg, int64_t chkpId, char* path) {
|
||||||
for (int i = 0; i < taosArrayGetSize(chkpDel); i++) {
|
for (int i = 0; i < taosArrayGetSize(chkpDel); i++) {
|
||||||
int64_t id = *(int64_t*)taosArrayGet(chkpDel, i);
|
int64_t id = *(int64_t*)taosArrayGet(chkpDel, i);
|
||||||
char tbuf[256] = {0};
|
char tbuf[256] = {0};
|
||||||
if (snprintf(tbuf, sizeof(tbuf), "%s%scheckpoint%" PRId64 "", path, TD_DIRSEP, id) >= sizeof(tbuf)) {
|
if (snprintf(tbuf, sizeof(tbuf), "%s%scheckpoint%" PRId64, path, TD_DIRSEP, id) >= sizeof(tbuf)) {
|
||||||
code = TSDB_CODE_OUT_OF_RANGE;
|
code = TSDB_CODE_OUT_OF_RANGE;
|
||||||
TAOS_CHECK_GOTO(code, NULL, _exception);
|
TAOS_CHECK_GOTO(code, NULL, _exception);
|
||||||
}
|
}
|
||||||
|
@ -1222,7 +1222,7 @@ int32_t taskDbLoadChkpInfo(STaskDbWrapper* pBackend) {
|
||||||
char checkpointPrefix[32] = {0};
|
char checkpointPrefix[32] = {0};
|
||||||
int64_t checkpointId = 0;
|
int64_t checkpointId = 0;
|
||||||
|
|
||||||
int ret = sscanf(taosGetDirEntryName(de), "checkpoint%" PRId64 "", &checkpointId);
|
int ret = sscanf(taosGetDirEntryName(de), "checkpoint%" PRId64, &checkpointId);
|
||||||
if (ret == 1) {
|
if (ret == 1) {
|
||||||
if (taosArrayPush(pBackend->chkpSaved, &checkpointId) == NULL) {
|
if (taosArrayPush(pBackend->chkpSaved, &checkpointId) == NULL) {
|
||||||
TAOS_CHECK_GOTO(terrno, NULL, _exception);
|
TAOS_CHECK_GOTO(terrno, NULL, _exception);
|
||||||
|
@ -1439,7 +1439,7 @@ int32_t taskDbDestroySnap(void* arg, SArray* pSnapInfo) {
|
||||||
}
|
}
|
||||||
STaskDbWrapper** pTaskDb = taosHashGet(pMeta->pTaskDbUnique, buf, strlen(buf));
|
STaskDbWrapper** pTaskDb = taosHashGet(pMeta->pTaskDbUnique, buf, strlen(buf));
|
||||||
if (pTaskDb == NULL || *pTaskDb == NULL) {
|
if (pTaskDb == NULL || *pTaskDb == NULL) {
|
||||||
stWarn("stream backend:%p failed to find task db, streamId:% " PRId64 "", pMeta, pSnap->streamId);
|
stWarn("stream backend:%p failed to find task db, streamId:% " PRId64, pMeta, pSnap->streamId);
|
||||||
memset(buf, 0, sizeof(buf));
|
memset(buf, 0, sizeof(buf));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -1540,7 +1540,7 @@ int32_t chkpLoadExtraInfo(char* pChkpIdDir, int64_t* chkpId, int64_t* processId)
|
||||||
goto _EXIT;
|
goto _EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sscanf(buf, "%" PRId64 " %" PRId64 "", chkpId, processId) < 2) {
|
if (sscanf(buf, "%" PRId64 " %" PRId64, chkpId, processId) < 2) {
|
||||||
code = TSDB_CODE_INVALID_PARA;
|
code = TSDB_CODE_INVALID_PARA;
|
||||||
stError("failed to read file content to load extra info, file:%s, reason:%s", pDst, tstrerror(code));
|
stError("failed to read file content to load extra info, file:%s, reason:%s", pDst, tstrerror(code));
|
||||||
goto _EXIT;
|
goto _EXIT;
|
||||||
|
@ -1588,7 +1588,7 @@ int32_t chkpAddExtraInfo(char* pChkpIdDir, int64_t chkpId, int64_t processId) {
|
||||||
goto _EXIT;
|
goto _EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
nBytes = snprintf(buf, sizeof(buf), "%" PRId64 " %" PRId64 "", chkpId, processId);
|
nBytes = snprintf(buf, sizeof(buf), "%" PRId64 " %" PRId64, chkpId, processId);
|
||||||
if (nBytes <= 0 || nBytes >= sizeof(buf)) {
|
if (nBytes <= 0 || nBytes >= sizeof(buf)) {
|
||||||
code = TSDB_CODE_OUT_OF_RANGE;
|
code = TSDB_CODE_OUT_OF_RANGE;
|
||||||
stError("failed to build content to add extra info, dir:%s,reason:%s", pChkpIdDir, tstrerror(code));
|
stError("failed to build content to add extra info, dir:%s,reason:%s", pChkpIdDir, tstrerror(code));
|
||||||
|
@ -1633,11 +1633,11 @@ int32_t taskDbDoCheckpoint(void* arg, int64_t chkpId, int64_t processId) {
|
||||||
|
|
||||||
// flush db
|
// flush db
|
||||||
if (written > 0) {
|
if (written > 0) {
|
||||||
stDebug("stream backend:%p start to flush db at:%s, data written:%" PRId64 "", pTaskDb, pChkpIdDir, written);
|
stDebug("stream backend:%p start to flush db at:%s, data written:%" PRId64, pTaskDb, pChkpIdDir, written);
|
||||||
code = chkpPreFlushDb(pTaskDb->db, ppCf, nCf);
|
code = chkpPreFlushDb(pTaskDb->db, ppCf, nCf);
|
||||||
if (code != 0) goto _EXIT;
|
if (code != 0) goto _EXIT;
|
||||||
} else {
|
} else {
|
||||||
stDebug("stream backend:%p not need flush db at:%s, data written:%" PRId64 "", pTaskDb, pChkpIdDir, written);
|
stDebug("stream backend:%p not need flush db at:%s, data written:%" PRId64, pTaskDb, pChkpIdDir, written);
|
||||||
}
|
}
|
||||||
|
|
||||||
// do checkpoint
|
// do checkpoint
|
||||||
|
@ -2724,7 +2724,7 @@ int32_t taskDbGenChkpUploadData__rsync(STaskDbWrapper* pDb, int64_t chkpId, char
|
||||||
}
|
}
|
||||||
|
|
||||||
nBytes =
|
nBytes =
|
||||||
snprintf(buf, cap, "%s%s%s%s%s%" PRId64 "", pDb->path, TD_DIRSEP, "checkpoints", TD_DIRSEP, "checkpoint", chkpId);
|
snprintf(buf, cap, "%s%s%s%s%s%" PRId64, pDb->path, TD_DIRSEP, "checkpoints", TD_DIRSEP, "checkpoint", chkpId);
|
||||||
if (nBytes <= 0 || nBytes >= cap) {
|
if (nBytes <= 0 || nBytes >= cap) {
|
||||||
taosMemoryFree(buf);
|
taosMemoryFree(buf);
|
||||||
TAOS_UNUSED(taosReleaseRef(taskDbWrapperId, refId));
|
TAOS_UNUSED(taosReleaseRef(taskDbWrapperId, refId));
|
||||||
|
@ -4474,7 +4474,7 @@ int32_t streamDefaultIterGet_rocksdb(SStreamState* pState, const void* start, co
|
||||||
}
|
}
|
||||||
if (strncmp(key, start, strlen(start)) == 0 && strlen(key) >= strlen(start) + 1) {
|
if (strncmp(key, start, strlen(start)) == 0 && strlen(key) >= strlen(start) + 1) {
|
||||||
int64_t checkPoint = 0;
|
int64_t checkPoint = 0;
|
||||||
if (sscanf(key + strlen(key), ":%" PRId64 "", &checkPoint) == 1) {
|
if (sscanf(key + strlen(key), ":%" PRId64, &checkPoint) == 1) {
|
||||||
if (taosArrayPush(result, &checkPoint) == NULL) {
|
if (taosArrayPush(result, &checkPoint) == NULL) {
|
||||||
code = terrno;
|
code = terrno;
|
||||||
break;
|
break;
|
||||||
|
@ -4852,7 +4852,7 @@ int32_t dbChkpGetDelta(SDbChkp* p, int64_t chkpId, SArray* list) {
|
||||||
memset(p->buf, 0, p->len);
|
memset(p->buf, 0, p->len);
|
||||||
|
|
||||||
nBytes =
|
nBytes =
|
||||||
snprintf(p->buf, p->len, "%s%s%s%scheckpoint%" PRId64 "", p->path, TD_DIRSEP, "checkpoints", TD_DIRSEP, chkpId);
|
snprintf(p->buf, p->len, "%s%s%s%scheckpoint%" PRId64, p->path, TD_DIRSEP, "checkpoints", TD_DIRSEP, chkpId);
|
||||||
if (nBytes <= 0 || nBytes >= p->len) {
|
if (nBytes <= 0 || nBytes >= p->len) {
|
||||||
TAOS_UNUSED(taosThreadRwlockUnlock(&p->rwLock));
|
TAOS_UNUSED(taosThreadRwlockUnlock(&p->rwLock));
|
||||||
return TSDB_CODE_OUT_OF_RANGE;
|
return TSDB_CODE_OUT_OF_RANGE;
|
||||||
|
@ -5070,7 +5070,7 @@ int32_t dbChkpDumpTo(SDbChkp* p, char* dname, SArray* list) {
|
||||||
char* srcDir = &dstBuf[cap];
|
char* srcDir = &dstBuf[cap];
|
||||||
char* dstDir = &srcDir[cap];
|
char* dstDir = &srcDir[cap];
|
||||||
|
|
||||||
int nBytes = snprintf(srcDir, cap, "%s%s%s%s%s%" PRId64 "", p->path, TD_DIRSEP, "checkpoints", TD_DIRSEP,
|
int nBytes = snprintf(srcDir, cap, "%s%s%s%s%s%" PRId64, p->path, TD_DIRSEP, "checkpoints", TD_DIRSEP,
|
||||||
"checkpoint", p->curChkpId);
|
"checkpoint", p->curChkpId);
|
||||||
if (nBytes <= 0 || nBytes >= cap) {
|
if (nBytes <= 0 || nBytes >= cap) {
|
||||||
code = TSDB_CODE_OUT_OF_RANGE;
|
code = TSDB_CODE_OUT_OF_RANGE;
|
||||||
|
@ -5145,7 +5145,7 @@ int32_t dbChkpDumpTo(SDbChkp* p, char* dname, SArray* list) {
|
||||||
goto _ERROR;
|
goto _ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
nBytes = snprintf(dstBuf, cap, "%s%s%s_%" PRId64 "", dstDir, TD_DIRSEP, p->pCurrent, p->curChkpId);
|
nBytes = snprintf(dstBuf, cap, "%s%s%s_%" PRId64, dstDir, TD_DIRSEP, p->pCurrent, p->curChkpId);
|
||||||
if (nBytes <= 0 || nBytes >= cap) {
|
if (nBytes <= 0 || nBytes >= cap) {
|
||||||
code = TSDB_CODE_OUT_OF_RANGE;
|
code = TSDB_CODE_OUT_OF_RANGE;
|
||||||
goto _ERROR;
|
goto _ERROR;
|
||||||
|
@ -5167,7 +5167,7 @@ int32_t dbChkpDumpTo(SDbChkp* p, char* dname, SArray* list) {
|
||||||
goto _ERROR;
|
goto _ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
nBytes = snprintf(dstBuf, cap, "%s%s%s_%" PRId64 "", dstDir, TD_DIRSEP, p->pManifest, p->curChkpId);
|
nBytes = snprintf(dstBuf, cap, "%s%s%s_%" PRId64, dstDir, TD_DIRSEP, p->pManifest, p->curChkpId);
|
||||||
if (nBytes <= 0 || nBytes >= cap) {
|
if (nBytes <= 0 || nBytes >= cap) {
|
||||||
code = TSDB_CODE_OUT_OF_RANGE;
|
code = TSDB_CODE_OUT_OF_RANGE;
|
||||||
goto _ERROR;
|
goto _ERROR;
|
||||||
|
|
|
@ -392,7 +392,7 @@ int32_t streamBackendSnapInitFile(char* metaPath, SStreamTaskSnap* pSnap, SBacke
|
||||||
return terrno;
|
return terrno;
|
||||||
}
|
}
|
||||||
|
|
||||||
nBytes = snprintf(path, cap, "%s%s%s%s%s%" PRId64 "", pSnap->dbPrefixPath, TD_DIRSEP, "checkpoints", TD_DIRSEP,
|
nBytes = snprintf(path, cap, "%s%s%s%s%s%" PRId64, pSnap->dbPrefixPath, TD_DIRSEP, "checkpoints", TD_DIRSEP,
|
||||||
"checkpoint", pSnap->chkpId);
|
"checkpoint", pSnap->chkpId);
|
||||||
if (nBytes <= 0 || nBytes >= cap) {
|
if (nBytes <= 0 || nBytes >= cap) {
|
||||||
code = TSDB_CODE_OUT_OF_RANGE;
|
code = TSDB_CODE_OUT_OF_RANGE;
|
||||||
|
@ -817,7 +817,7 @@ int32_t streamSnapWrite(SStreamSnapWriter* pWriter, uint8_t* pData, uint32_t nDa
|
||||||
return terrno;
|
return terrno;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t ret = snprintf(path, bufLen, "%s%s%s%s%s%s%s%" PRId64 "", pHandle->metaPath, TD_DIRSEP, idstr, TD_DIRSEP,
|
int32_t ret = snprintf(path, bufLen, "%s%s%s%s%s%s%s%" PRId64, pHandle->metaPath, TD_DIRSEP, idstr, TD_DIRSEP,
|
||||||
"checkpoints", TD_DIRSEP, "checkpoint", snapInfo.chkpId);
|
"checkpoints", TD_DIRSEP, "checkpoint", snapInfo.chkpId);
|
||||||
if (ret < 0 || ret >= bufLen) {
|
if (ret < 0 || ret >= bufLen) {
|
||||||
stError("s-task:0x%x failed to set the path for take snapshot, code: out of buffer, %s", (int32_t)snapInfo.taskId,
|
stError("s-task:0x%x failed to set the path for take snapshot, code: out of buffer, %s", (int32_t)snapInfo.taskId,
|
||||||
|
|
|
@ -1020,7 +1020,7 @@ _end:
|
||||||
|
|
||||||
int32_t forceRemoveCheckpoint(SStreamFileState* pFileState, int64_t checkpointId) {
|
int32_t forceRemoveCheckpoint(SStreamFileState* pFileState, int64_t checkpointId) {
|
||||||
char keyBuf[128] = {0};
|
char keyBuf[128] = {0};
|
||||||
TAOS_UNUSED(tsnprintf(keyBuf, sizeof(keyBuf), "%s:%" PRId64 "", TASK_KEY, checkpointId));
|
TAOS_UNUSED(tsnprintf(keyBuf, sizeof(keyBuf), "%s:%" PRId64, TASK_KEY, checkpointId));
|
||||||
return streamDefaultDel_rocksdb(pFileState->pFileStore, keyBuf);
|
return streamDefaultDel_rocksdb(pFileState->pFileStore, keyBuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1045,7 +1045,7 @@ int32_t deleteExpiredCheckPoint(SStreamFileState* pFileState, TSKEY mark) {
|
||||||
char buf[128] = {0};
|
char buf[128] = {0};
|
||||||
void* val = 0;
|
void* val = 0;
|
||||||
int32_t len = 0;
|
int32_t len = 0;
|
||||||
TAOS_UNUSED(tsnprintf(buf, sizeof(buf), "%s:%" PRId64 "", TASK_KEY, i));
|
TAOS_UNUSED(tsnprintf(buf, sizeof(buf), "%s:%" PRId64, TASK_KEY, i));
|
||||||
code = streamDefaultGet_rocksdb(pFileState->pFileStore, buf, &val, &len);
|
code = streamDefaultGet_rocksdb(pFileState->pFileStore, buf, &val, &len);
|
||||||
if (code != 0) {
|
if (code != 0) {
|
||||||
return TSDB_CODE_FAILED;
|
return TSDB_CODE_FAILED;
|
||||||
|
|
|
@ -70,7 +70,7 @@ int32_t syncNodeOnRequestVoteReply(SSyncNode* ths, const SRpcMsg* pRpcMsg) {
|
||||||
// but they won't be looked at, so it doesn't matter.
|
// but they won't be looked at, so it doesn't matter.
|
||||||
if (ths->state == TAOS_SYNC_STATE_CANDIDATE) {
|
if (ths->state == TAOS_SYNC_STATE_CANDIDATE) {
|
||||||
if (ths->pVotesRespond->term != pMsg->term) {
|
if (ths->pVotesRespond->term != pMsg->term) {
|
||||||
sNError(ths, "vote respond error vote-respond-mgr term:%" PRIu64 ", msg term:%" PRIu64 "",
|
sNError(ths, "vote respond error vote-respond-mgr term:%" PRIu64 ", msg term:%" PRIu64,
|
||||||
ths->pVotesRespond->term, pMsg->term);
|
ths->pVotesRespond->term, pMsg->term);
|
||||||
|
|
||||||
TAOS_RETURN(TSDB_CODE_SYN_WRONG_TERM);
|
TAOS_RETURN(TSDB_CODE_SYN_WRONG_TERM);
|
||||||
|
|
|
@ -260,13 +260,13 @@ static int32_t httpCreateMsg(const char* server, const char* uri, uint16_t port,
|
||||||
EHttpCompFlag flag, int64_t chanId, const char* qid, SHttpMsg** httpMsg) {
|
EHttpCompFlag flag, int64_t chanId, const char* qid, SHttpMsg** httpMsg) {
|
||||||
int64_t seqNum = atomic_fetch_add_64(&httpSeqNum, 1);
|
int64_t seqNum = atomic_fetch_add_64(&httpSeqNum, 1);
|
||||||
if (server == NULL || uri == NULL) {
|
if (server == NULL || uri == NULL) {
|
||||||
tError("http-report failed to report to invalid addr, chanId:%" PRId64 ", seq:%" PRId64 "", chanId, seqNum);
|
tError("http-report failed to report to invalid addr, chanId:%" PRId64 ", seq:%" PRId64, chanId, seqNum);
|
||||||
*httpMsg = NULL;
|
*httpMsg = NULL;
|
||||||
return TSDB_CODE_INVALID_PARA;
|
return TSDB_CODE_INVALID_PARA;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pCont == NULL || contLen == 0) {
|
if (pCont == NULL || contLen == 0) {
|
||||||
tError("http-report failed to report empty packet, chanId:%" PRId64 ", seq:%" PRId64 "", chanId, seqNum);
|
tError("http-report failed to report empty packet, chanId:%" PRId64 ", seq:%" PRId64, chanId, seqNum);
|
||||||
*httpMsg = NULL;
|
*httpMsg = NULL;
|
||||||
return TSDB_CODE_INVALID_PARA;
|
return TSDB_CODE_INVALID_PARA;
|
||||||
}
|
}
|
||||||
|
@ -318,7 +318,7 @@ static void httpDestroyMsg(SHttpMsg* msg) {
|
||||||
}
|
}
|
||||||
static void httpDestroyMsgWrapper(void* cont, void* param) {
|
static void httpDestroyMsgWrapper(void* cont, void* param) {
|
||||||
SHttpMsg* pMsg = cont;
|
SHttpMsg* pMsg = cont;
|
||||||
tWarn("http-report destroy msg, chanId:%" PRId64 ", seq:%" PRId64 "", pMsg->chanId, pMsg->seq);
|
tWarn("http-report destroy msg, chanId:%" PRId64 ", seq:%" PRId64, pMsg->chanId, pMsg->seq);
|
||||||
httpDestroyMsg(pMsg);
|
httpDestroyMsg(pMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -360,7 +360,7 @@ static void httpTrace(queue* q) {
|
||||||
msg = QUEUE_DATA(h, SHttpMsg, q);
|
msg = QUEUE_DATA(h, SHttpMsg, q);
|
||||||
endSeq = msg->seq;
|
endSeq = msg->seq;
|
||||||
|
|
||||||
tDebug("http-report process msg, start_seq:%" PRId64 ", end_seq:%" PRId64 ", max_seq:%" PRId64 "", startSeq, endSeq,
|
tDebug("http-report process msg, start_seq:%" PRId64 ", end_seq:%" PRId64 ", max_seq:%" PRId64, startSeq, endSeq,
|
||||||
atomic_load_64(&httpSeqNum) - 1);
|
atomic_load_64(&httpSeqNum) - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -438,9 +438,9 @@ static FORCE_INLINE void clientRecvCb(uv_stream_t* handle, ssize_t nread, const
|
||||||
STUB_RAND_NETWORK_ERR(nread);
|
STUB_RAND_NETWORK_ERR(nread);
|
||||||
SHttpClient* cli = handle->data;
|
SHttpClient* cli = handle->data;
|
||||||
if (nread < 0) {
|
if (nread < 0) {
|
||||||
tError("http-report recv error:%s, seq:%" PRId64 "", uv_strerror(nread), cli->seq);
|
tError("http-report recv error:%s, seq:%" PRId64, uv_strerror(nread), cli->seq);
|
||||||
} else {
|
} else {
|
||||||
tTrace("http-report succ to recv %d bytes, seq:%" PRId64 "", (int32_t)nread, cli->seq);
|
tTrace("http-report succ to recv %d bytes, seq:%" PRId64, (int32_t)nread, cli->seq);
|
||||||
if (cli->recvBufRid > 0) {
|
if (cli->recvBufRid > 0) {
|
||||||
SHttpRecvBuf* p = taosAcquireRef(httpRecvRefMgt, cli->recvBufRid);
|
SHttpRecvBuf* p = taosAcquireRef(httpRecvRefMgt, cli->recvBufRid);
|
||||||
if (p != NULL) {
|
if (p != NULL) {
|
||||||
|
@ -472,19 +472,19 @@ static void clientSentCb(uv_write_t* req, int32_t status) {
|
||||||
STUB_RAND_NETWORK_ERR(status);
|
STUB_RAND_NETWORK_ERR(status);
|
||||||
SHttpClient* cli = req->data;
|
SHttpClient* cli = req->data;
|
||||||
if (status != 0) {
|
if (status != 0) {
|
||||||
tError("http-report failed to send data, reason:%s, dst:%s:%d, chanId:%" PRId64 ", seq:%" PRId64 "",
|
tError("http-report failed to send data, reason:%s, dst:%s:%d, chanId:%" PRId64 ", seq:%" PRId64,
|
||||||
uv_strerror(status), cli->addr, cli->port, cli->chanId, cli->seq);
|
uv_strerror(status), cli->addr, cli->port, cli->chanId, cli->seq);
|
||||||
if (!uv_is_closing((uv_handle_t*)&cli->tcp)) {
|
if (!uv_is_closing((uv_handle_t*)&cli->tcp)) {
|
||||||
uv_close((uv_handle_t*)&cli->tcp, clientCloseCb);
|
uv_close((uv_handle_t*)&cli->tcp, clientCloseCb);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
tTrace("http-report succ to send data, chanId:%" PRId64 ", seq:%" PRId64 "", cli->chanId, cli->seq);
|
tTrace("http-report succ to send data, chanId:%" PRId64 ", seq:%" PRId64, cli->chanId, cli->seq);
|
||||||
}
|
}
|
||||||
|
|
||||||
status = uv_read_start((uv_stream_t*)&cli->tcp, clientAllocBuffCb, clientRecvCb);
|
status = uv_read_start((uv_stream_t*)&cli->tcp, clientAllocBuffCb, clientRecvCb);
|
||||||
if (status != 0) {
|
if (status != 0) {
|
||||||
tError("http-report failed to recv data,reason:%s, dst:%s:%d, chanId:%" PRId64 ", seq:%" PRId64 "",
|
tError("http-report failed to recv data,reason:%s, dst:%s:%d, chanId:%" PRId64 ", seq:%" PRId64,
|
||||||
uv_strerror(status), cli->addr, cli->port, cli->chanId, cli->seq);
|
uv_strerror(status), cli->addr, cli->port, cli->chanId, cli->seq);
|
||||||
if (!uv_is_closing((uv_handle_t*)&cli->tcp)) {
|
if (!uv_is_closing((uv_handle_t*)&cli->tcp)) {
|
||||||
uv_close((uv_handle_t*)&cli->tcp, clientCloseCb);
|
uv_close((uv_handle_t*)&cli->tcp, clientCloseCb);
|
||||||
|
@ -499,7 +499,7 @@ static void clientConnCb(uv_connect_t* req, int32_t status) {
|
||||||
SHttpModule* http = taosAcquireRef(httpRefMgt, chanId);
|
SHttpModule* http = taosAcquireRef(httpRefMgt, chanId);
|
||||||
if (status != 0) {
|
if (status != 0) {
|
||||||
httpFailFastMayUpdate(http->connStatusTable, cli->addr, cli->port, 0);
|
httpFailFastMayUpdate(http->connStatusTable, cli->addr, cli->port, 0);
|
||||||
tError("http-report failed to conn to server, reason:%s, dst:%s:%d, chanId:%" PRId64 ", seq:%" PRId64 "",
|
tError("http-report failed to conn to server, reason:%s, dst:%s:%d, chanId:%" PRId64 ", seq:%" PRId64,
|
||||||
uv_strerror(status), cli->addr, cli->port, chanId, cli->seq);
|
uv_strerror(status), cli->addr, cli->port, chanId, cli->seq);
|
||||||
if (!uv_is_closing((uv_handle_t*)&cli->tcp)) {
|
if (!uv_is_closing((uv_handle_t*)&cli->tcp)) {
|
||||||
uv_close((uv_handle_t*)&cli->tcp, clientCloseCb);
|
uv_close((uv_handle_t*)&cli->tcp, clientCloseCb);
|
||||||
|
@ -513,7 +513,7 @@ static void clientConnCb(uv_connect_t* req, int32_t status) {
|
||||||
|
|
||||||
status = uv_write(&cli->req, (uv_stream_t*)&cli->tcp, cli->wbuf, 2, clientSentCb);
|
status = uv_write(&cli->req, (uv_stream_t*)&cli->tcp, cli->wbuf, 2, clientSentCb);
|
||||||
if (0 != status) {
|
if (0 != status) {
|
||||||
tError("http-report failed to send data,reason:%s, dst:%s:%d, chanId:%" PRId64 ", seq:%" PRId64 "",
|
tError("http-report failed to send data,reason:%s, dst:%s:%d, chanId:%" PRId64 ", seq:%" PRId64,
|
||||||
uv_strerror(status), cli->addr, cli->port, chanId, cli->seq);
|
uv_strerror(status), cli->addr, cli->port, chanId, cli->seq);
|
||||||
if (!uv_is_closing((uv_handle_t*)&cli->tcp)) {
|
if (!uv_is_closing((uv_handle_t*)&cli->tcp)) {
|
||||||
uv_close((uv_handle_t*)&cli->tcp, clientCloseCb);
|
uv_close((uv_handle_t*)&cli->tcp, clientCloseCb);
|
||||||
|
@ -561,7 +561,7 @@ static void httpHandleQuit(SHttpMsg* msg) {
|
||||||
int64_t chanId = msg->chanId;
|
int64_t chanId = msg->chanId;
|
||||||
taosMemoryFree(msg);
|
taosMemoryFree(msg);
|
||||||
|
|
||||||
tDebug("http-report receive quit, chanId:%" PRId64 ", seq:%" PRId64 "", chanId, seq);
|
tDebug("http-report receive quit, chanId:%" PRId64 ", seq:%" PRId64, chanId, seq);
|
||||||
SHttpModule* http = taosAcquireRef(httpRefMgt, chanId);
|
SHttpModule* http = taosAcquireRef(httpRefMgt, chanId);
|
||||||
if (http == NULL) return;
|
if (http == NULL) return;
|
||||||
uv_walk(http->loop, httpWalkCb, NULL);
|
uv_walk(http->loop, httpWalkCb, NULL);
|
||||||
|
@ -778,7 +778,7 @@ static int32_t taosSendHttpReportImplByChan2(const char* server, const char* uri
|
||||||
code = TSDB_CODE_HTTP_MODULE_QUIT;
|
code = TSDB_CODE_HTTP_MODULE_QUIT;
|
||||||
goto _ERROR;
|
goto _ERROR;
|
||||||
}
|
}
|
||||||
tDebug("http-report start to report, chanId:%" PRId64 ", seq:%" PRId64 "", chanId, msg->seq);
|
tDebug("http-report start to report, chanId:%" PRId64 ", seq:%" PRId64, chanId, msg->seq);
|
||||||
|
|
||||||
code = transAsyncSend(load->asyncPool, &(msg->q));
|
code = transAsyncSend(load->asyncPool, &(msg->q));
|
||||||
if (code != 0) {
|
if (code != 0) {
|
||||||
|
@ -790,7 +790,7 @@ static int32_t taosSendHttpReportImplByChan2(const char* server, const char* uri
|
||||||
_ERROR:
|
_ERROR:
|
||||||
|
|
||||||
if (code != 0) {
|
if (code != 0) {
|
||||||
tError("http-report failed to report reason:%s, chanId:%" PRId64 ", seq:%" PRId64 "", tstrerror(code), chanId,
|
tError("http-report failed to report reason:%s, chanId:%" PRId64 ", seq:%" PRId64, tstrerror(code), chanId,
|
||||||
msg->seq);
|
msg->seq);
|
||||||
}
|
}
|
||||||
httpDestroyMsg(msg);
|
httpDestroyMsg(msg);
|
||||||
|
@ -816,7 +816,7 @@ static int32_t taosSendHttpReportImplByChan(const char* server, const char* uri,
|
||||||
code = TSDB_CODE_HTTP_MODULE_QUIT;
|
code = TSDB_CODE_HTTP_MODULE_QUIT;
|
||||||
goto _ERROR;
|
goto _ERROR;
|
||||||
}
|
}
|
||||||
tDebug("http-report start to report, chanId:%" PRId64 ", seq:%" PRId64 "", chanId, msg->seq);
|
tDebug("http-report start to report, chanId:%" PRId64 ", seq:%" PRId64, chanId, msg->seq);
|
||||||
|
|
||||||
code = transAsyncSend(load->asyncPool, &(msg->q));
|
code = transAsyncSend(load->asyncPool, &(msg->q));
|
||||||
if (code != 0) {
|
if (code != 0) {
|
||||||
|
@ -828,7 +828,7 @@ static int32_t taosSendHttpReportImplByChan(const char* server, const char* uri,
|
||||||
_ERROR:
|
_ERROR:
|
||||||
|
|
||||||
if (code != 0) {
|
if (code != 0) {
|
||||||
tError("http-report failed to report reason:%s, chanId:%" PRId64 ", seq:%" PRId64 "", tstrerror(code), chanId,
|
tError("http-report failed to report reason:%s, chanId:%" PRId64 ", seq:%" PRId64, tstrerror(code), chanId,
|
||||||
msg->seq);
|
msg->seq);
|
||||||
}
|
}
|
||||||
httpDestroyMsg(msg);
|
httpDestroyMsg(msg);
|
||||||
|
@ -957,7 +957,7 @@ void taosDestroyHttpChan(int64_t chanId) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (taosThreadJoin(load->thread, NULL) != 0) {
|
if (taosThreadJoin(load->thread, NULL) != 0) {
|
||||||
tTrace("http-report failed to join thread, chanId %" PRId64 "", chanId);
|
tTrace("http-report failed to join thread, chanId %" PRId64, chanId);
|
||||||
}
|
}
|
||||||
|
|
||||||
httpModuleDestroy(load);
|
httpModuleDestroy(load);
|
||||||
|
|
|
@ -595,7 +595,7 @@ int32_t cliHandleState_mayHandleReleaseResp(SCliConn* conn, STransMsgHead* pHead
|
||||||
int64_t qId = taosHton64(pHead->qid);
|
int64_t qId = taosHton64(pHead->qid);
|
||||||
STraceId* trace = &pHead->traceId;
|
STraceId* trace = &pHead->traceId;
|
||||||
int64_t seqNum = taosHton64(pHead->seqNum);
|
int64_t seqNum = taosHton64(pHead->seqNum);
|
||||||
tGDebug("%s conn:%p, %s received from %s, local info:%s, len:%d, seqNum:%" PRId64 ", sid:%" PRId64 "",
|
tGDebug("%s conn:%p, %s received from %s, local info:%s, len:%d, seqNum:%" PRId64 ", sid:%" PRId64,
|
||||||
CONN_GET_INST_LABEL(conn), conn, TMSG_INFO(pHead->msgType), conn->dst, conn->src, pHead->msgLen, seqNum,
|
CONN_GET_INST_LABEL(conn), conn, TMSG_INFO(pHead->msgType), conn->dst, conn->src, pHead->msgLen, seqNum,
|
||||||
qId);
|
qId);
|
||||||
|
|
||||||
|
|
|
@ -395,11 +395,11 @@ static void uvPerfLog_receive(SSvrConn* pConn, STransMsgHead* pHead, STransMsg*
|
||||||
if (pConn->status == ConnNormal && pHead->noResp == 0) {
|
if (pConn->status == ConnNormal && pHead->noResp == 0) {
|
||||||
if (cost >= EXCEPTION_LIMIT_US) {
|
if (cost >= EXCEPTION_LIMIT_US) {
|
||||||
tGDebug("%s conn:%p, %s received from %s, local info:%s, len:%d, cost:%dus, recv exception, seqNum:%" PRId64
|
tGDebug("%s conn:%p, %s received from %s, local info:%s, len:%d, cost:%dus, recv exception, seqNum:%" PRId64
|
||||||
", sid:%" PRId64 "",
|
", sid:%" PRId64,
|
||||||
transLabel(pInst), pConn, TMSG_INFO(pTransMsg->msgType), pConn->dst, pConn->src, pTransMsg->contLen,
|
transLabel(pInst), pConn, TMSG_INFO(pTransMsg->msgType), pConn->dst, pConn->src, pTransMsg->contLen,
|
||||||
(int)cost, pTransMsg->info.seqNum, pTransMsg->info.qId);
|
(int)cost, pTransMsg->info.seqNum, pTransMsg->info.qId);
|
||||||
} else {
|
} else {
|
||||||
tGDebug("%s conn:%p, %s received from %s, local info:%s, len:%d, cost:%dus, seqNum:%" PRId64 ", sid:%" PRId64 "",
|
tGDebug("%s conn:%p, %s received from %s, local info:%s, len:%d, cost:%dus, seqNum:%" PRId64 ", sid:%" PRId64,
|
||||||
transLabel(pInst), pConn, TMSG_INFO(pTransMsg->msgType), pConn->dst, pConn->src, pTransMsg->contLen,
|
transLabel(pInst), pConn, TMSG_INFO(pTransMsg->msgType), pConn->dst, pConn->src, pTransMsg->contLen,
|
||||||
(int)cost, pTransMsg->info.seqNum, pTransMsg->info.qId);
|
(int)cost, pTransMsg->info.seqNum, pTransMsg->info.qId);
|
||||||
}
|
}
|
||||||
|
@ -407,13 +407,13 @@ static void uvPerfLog_receive(SSvrConn* pConn, STransMsgHead* pHead, STransMsg*
|
||||||
if (cost >= EXCEPTION_LIMIT_US) {
|
if (cost >= EXCEPTION_LIMIT_US) {
|
||||||
tGDebug(
|
tGDebug(
|
||||||
"%s conn:%p, %s received from %s, local info:%s, len:%d, noResp:%d, code:%d, cost:%dus, recv exception, "
|
"%s conn:%p, %s received from %s, local info:%s, len:%d, noResp:%d, code:%d, cost:%dus, recv exception, "
|
||||||
"seqNum:%" PRId64 ", sid:%" PRId64 "",
|
"seqNum:%" PRId64 ", sid:%" PRId64,
|
||||||
transLabel(pInst), pConn, TMSG_INFO(pTransMsg->msgType), pConn->dst, pConn->src, pTransMsg->contLen,
|
transLabel(pInst), pConn, TMSG_INFO(pTransMsg->msgType), pConn->dst, pConn->src, pTransMsg->contLen,
|
||||||
pHead->noResp, pTransMsg->code, (int)(cost), pTransMsg->info.seqNum, pTransMsg->info.qId);
|
pHead->noResp, pTransMsg->code, (int)(cost), pTransMsg->info.seqNum, pTransMsg->info.qId);
|
||||||
} else {
|
} else {
|
||||||
tGDebug("%s conn:%p, %s received from %s, local info:%s, len:%d, noResp:%d, code:%d, cost:%dus, seqNum:%" PRId64
|
tGDebug("%s conn:%p, %s received from %s, local info:%s, len:%d, noResp:%d, code:%d, cost:%dus, seqNum:%" PRId64
|
||||||
", "
|
", "
|
||||||
"sid:%" PRId64 "",
|
"sid:%" PRId64,
|
||||||
transLabel(pInst), pConn, TMSG_INFO(pTransMsg->msgType), pConn->dst, pConn->src, pTransMsg->contLen,
|
transLabel(pInst), pConn, TMSG_INFO(pTransMsg->msgType), pConn->dst, pConn->src, pTransMsg->contLen,
|
||||||
pHead->noResp, pTransMsg->code, (int)(cost), pTransMsg->info.seqNum, pTransMsg->info.qId);
|
pHead->noResp, pTransMsg->code, (int)(cost), pTransMsg->info.seqNum, pTransMsg->info.qId);
|
||||||
}
|
}
|
||||||
|
@ -441,23 +441,23 @@ static int32_t uvMayHandleReleaseReq(SSvrConn* pConn, STransMsgHead* pHead) {
|
||||||
if (pHead->msgType == TDMT_SCH_TASK_RELEASE) {
|
if (pHead->msgType == TDMT_SCH_TASK_RELEASE) {
|
||||||
int64_t qId = taosHton64(pHead->qid);
|
int64_t qId = taosHton64(pHead->qid);
|
||||||
if (qId <= 0) {
|
if (qId <= 0) {
|
||||||
tError("conn:%p, recv release, but invalid sid:%" PRId64 "", pConn, qId);
|
tError("conn:%p, recv release, but invalid sid:%" PRId64, pConn, qId);
|
||||||
code = TSDB_CODE_RPC_NO_STATE;
|
code = TSDB_CODE_RPC_NO_STATE;
|
||||||
} else {
|
} else {
|
||||||
void* p = taosHashGet(pConn->pQTable, &qId, sizeof(qId));
|
void* p = taosHashGet(pConn->pQTable, &qId, sizeof(qId));
|
||||||
if (p == NULL) {
|
if (p == NULL) {
|
||||||
code = TSDB_CODE_RPC_NO_STATE;
|
code = TSDB_CODE_RPC_NO_STATE;
|
||||||
tTrace("conn:%p, recv release, and releady release by server sid:%" PRId64 "", pConn, qId);
|
tTrace("conn:%p, recv release, and releady release by server sid:%" PRId64, pConn, qId);
|
||||||
} else {
|
} else {
|
||||||
SSvrRegArg* arg = p;
|
SSvrRegArg* arg = p;
|
||||||
(pInst->cfp)(pInst->parent, &(arg->msg), NULL);
|
(pInst->cfp)(pInst->parent, &(arg->msg), NULL);
|
||||||
tTrace("conn:%p, recv release, notify server app, sid:%" PRId64 "", pConn, qId);
|
tTrace("conn:%p, recv release, notify server app, sid:%" PRId64, pConn, qId);
|
||||||
|
|
||||||
code = taosHashRemove(pConn->pQTable, &qId, sizeof(qId));
|
code = taosHashRemove(pConn->pQTable, &qId, sizeof(qId));
|
||||||
if (code != 0) {
|
if (code != 0) {
|
||||||
tDebug("conn:%p, failed to remove sid:%" PRId64 "", pConn, qId);
|
tDebug("conn:%p, failed to remove sid:%" PRId64, pConn, qId);
|
||||||
}
|
}
|
||||||
tTrace("conn:%p, clear state,sid:%" PRId64 "", pConn, qId);
|
tTrace("conn:%p, clear state,sid:%" PRId64, pConn, qId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -693,7 +693,7 @@ void uvOnSendCb(uv_write_t* req, int status) {
|
||||||
|
|
||||||
SSvrRespMsg* smsg = QUEUE_DATA(head, SSvrRespMsg, q);
|
SSvrRespMsg* smsg = QUEUE_DATA(head, SSvrRespMsg, q);
|
||||||
STraceId* trace = &smsg->msg.info.traceId;
|
STraceId* trace = &smsg->msg.info.traceId;
|
||||||
tGDebug("%s conn:%p, msg already send out, seqNum:%" PRId64 ", sid:%" PRId64 "", transLabel(conn->pInst), conn,
|
tGDebug("%s conn:%p, msg already send out, seqNum:%" PRId64 ", sid:%" PRId64, transLabel(conn->pInst), conn,
|
||||||
smsg->msg.info.seqNum, smsg->msg.info.qId);
|
smsg->msg.info.seqNum, smsg->msg.info.qId);
|
||||||
destroySmsg(smsg);
|
destroySmsg(smsg);
|
||||||
}
|
}
|
||||||
|
@ -772,7 +772,7 @@ static int32_t uvPrepareSendData(SSvrRespMsg* smsg, uv_buf_t* wb) {
|
||||||
}
|
}
|
||||||
|
|
||||||
STraceId* trace = &pMsg->info.traceId;
|
STraceId* trace = &pMsg->info.traceId;
|
||||||
tGDebug("%s conn:%p, %s is sent to %s, local info:%s, len:%d, seqNum:%" PRId64 ", sid:%" PRId64 "", transLabel(pInst),
|
tGDebug("%s conn:%p, %s is sent to %s, local info:%s, len:%d, seqNum:%" PRId64 ", sid:%" PRId64, transLabel(pInst),
|
||||||
pConn, TMSG_INFO(pHead->msgType), pConn->dst, pConn->src, len, pMsg->info.seqNum, pMsg->info.qId);
|
pConn, TMSG_INFO(pHead->msgType), pConn->dst, pConn->src, len, pMsg->info.seqNum, pMsg->info.qId);
|
||||||
|
|
||||||
wb->base = (char*)pHead;
|
wb->base = (char*)pHead;
|
||||||
|
@ -879,7 +879,7 @@ int32_t uvMayHandleReleaseResp(SSvrRespMsg* pMsg) {
|
||||||
if (pMsg->msg.msgType == TDMT_SCH_TASK_RELEASE && qid > 0) {
|
if (pMsg->msg.msgType == TDMT_SCH_TASK_RELEASE && qid > 0) {
|
||||||
SSvrRegArg* p = taosHashGet(pConn->pQTable, &qid, sizeof(qid));
|
SSvrRegArg* p = taosHashGet(pConn->pQTable, &qid, sizeof(qid));
|
||||||
if (p == NULL) {
|
if (p == NULL) {
|
||||||
tError("%s conn:%p, already release sid:%" PRId64 "", transLabel(pConn->pInst), pConn, qid);
|
tError("%s conn:%p, already release sid:%" PRId64, transLabel(pConn->pInst), pConn, qid);
|
||||||
return TSDB_CODE_RPC_NO_STATE;
|
return TSDB_CODE_RPC_NO_STATE;
|
||||||
} else {
|
} else {
|
||||||
transFreeMsg(p->msg.pCont);
|
transFreeMsg(p->msg.pCont);
|
||||||
|
@ -1424,7 +1424,7 @@ void uvConnDestroyAllState(SSvrConn* p) {
|
||||||
SSvrRegArg* arg = pIter;
|
SSvrRegArg* arg = pIter;
|
||||||
int64_t* qid = taosHashGetKey(pIter, NULL);
|
int64_t* qid = taosHashGetKey(pIter, NULL);
|
||||||
(pInst->cfp)(pInst->parent, &(arg->msg), NULL);
|
(pInst->cfp)(pInst->parent, &(arg->msg), NULL);
|
||||||
tTrace("conn:%p, broken, notify server app, sid:%" PRId64 "", p, *qid);
|
tTrace("conn:%p, broken, notify server app, sid:%" PRId64, p, *qid);
|
||||||
pIter = taosHashIterate(pQTable, pIter);
|
pIter = taosHashIterate(pQTable, pIter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1729,7 +1729,7 @@ int32_t uvHandleStateReq(SSvrRespMsg* msg) {
|
||||||
int32_t code = 0;
|
int32_t code = 0;
|
||||||
SSvrConn* conn = msg->pConn;
|
SSvrConn* conn = msg->pConn;
|
||||||
int64_t qid = msg->msg.info.qId;
|
int64_t qid = msg->msg.info.qId;
|
||||||
tDebug("%s conn:%p, start to register brokenlink callback, sid:%" PRId64 "", transLabel(conn->pInst), conn, qid);
|
tDebug("%s conn:%p, start to register brokenlink callback, sid:%" PRId64, transLabel(conn->pInst), conn, qid);
|
||||||
|
|
||||||
SSvrRegArg arg = {.notifyCount = 0, .init = 1, .msg = msg->msg};
|
SSvrRegArg arg = {.notifyCount = 0, .init = 1, .msg = msg->msg};
|
||||||
SSvrRegArg* p = taosHashGet(conn->pQTable, &qid, sizeof(qid));
|
SSvrRegArg* p = taosHashGet(conn->pQTable, &qid, sizeof(qid));
|
||||||
|
@ -1906,7 +1906,7 @@ int32_t transReleaseSrvHandle(void* handle, int32_t status) {
|
||||||
m->msg = tmsg;
|
m->msg = tmsg;
|
||||||
m->type = Normal;
|
m->type = Normal;
|
||||||
|
|
||||||
tDebug("%s conn:%p, start to send %s, sid:%" PRId64 "", transLabel(pThrd->pInst), exh->handle,
|
tDebug("%s conn:%p, start to send %s, sid:%" PRId64, transLabel(pThrd->pInst), exh->handle,
|
||||||
TMSG_INFO(tmsg.msgType), qId);
|
TMSG_INFO(tmsg.msgType), qId);
|
||||||
if ((code = transAsyncSend(pThrd->asyncPool, &m->q)) != 0) {
|
if ((code = transAsyncSend(pThrd->asyncPool, &m->q)) != 0) {
|
||||||
destroySmsg(m);
|
destroySmsg(m);
|
||||||
|
|
|
@ -367,10 +367,10 @@ static void *queryStableAggrFunc(void *sarg) {
|
||||||
if (i == 1) {
|
if (i == 1) {
|
||||||
if (g_arguments->demo_mode) {
|
if (g_arguments->demo_mode) {
|
||||||
snprintf(tempS, LARGE_BUFF_LEN,
|
snprintf(tempS, LARGE_BUFF_LEN,
|
||||||
"groupid = %" PRId64 "", i);
|
"groupid = %" PRId64, i);
|
||||||
} else {
|
} else {
|
||||||
snprintf(tempS, LARGE_BUFF_LEN,
|
snprintf(tempS, LARGE_BUFF_LEN,
|
||||||
"t0 = %" PRId64 "", i);
|
"t0 = %" PRId64, i);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (g_arguments->demo_mode) {
|
if (g_arguments->demo_mode) {
|
||||||
|
|
|
@ -2140,7 +2140,7 @@ void generateSmlJsonTags(tools_cJSON *tagsList,
|
||||||
uint64_t start_table_from, int tbSeq) {
|
uint64_t start_table_from, int tbSeq) {
|
||||||
tools_cJSON * tags = tools_cJSON_CreateObject();
|
tools_cJSON * tags = tools_cJSON_CreateObject();
|
||||||
char * tbName = benchCalloc(1, TSDB_TABLE_NAME_LEN, true);
|
char * tbName = benchCalloc(1, TSDB_TABLE_NAME_LEN, true);
|
||||||
snprintf(tbName, TSDB_TABLE_NAME_LEN, "%s%" PRIu64 "",
|
snprintf(tbName, TSDB_TABLE_NAME_LEN, "%s%" PRIu64,
|
||||||
stbInfo->childTblPrefix, start_table_from + tbSeq);
|
stbInfo->childTblPrefix, start_table_from + tbSeq);
|
||||||
char *tagName = benchCalloc(1, TSDB_MAX_TAGS, true);
|
char *tagName = benchCalloc(1, TSDB_MAX_TAGS, true);
|
||||||
for (int i = 0; i < stbInfo->tags->size; i++) {
|
for (int i = 0; i < stbInfo->tags->size; i++) {
|
||||||
|
@ -2202,7 +2202,7 @@ void generateSmlTaosJsonTags(tools_cJSON *tagsList, SSuperTable *stbInfo,
|
||||||
uint64_t start_table_from, int tbSeq) {
|
uint64_t start_table_from, int tbSeq) {
|
||||||
tools_cJSON * tags = tools_cJSON_CreateObject();
|
tools_cJSON * tags = tools_cJSON_CreateObject();
|
||||||
char * tbName = benchCalloc(1, TSDB_TABLE_NAME_LEN, true);
|
char * tbName = benchCalloc(1, TSDB_TABLE_NAME_LEN, true);
|
||||||
snprintf(tbName, TSDB_TABLE_NAME_LEN, "%s%" PRIu64 "",
|
snprintf(tbName, TSDB_TABLE_NAME_LEN, "%s%" PRIu64,
|
||||||
stbInfo->childTblPrefix, tbSeq + start_table_from);
|
stbInfo->childTblPrefix, tbSeq + start_table_from);
|
||||||
tools_cJSON_AddStringToObject(tags, "id", tbName);
|
tools_cJSON_AddStringToObject(tags, "id", tbName);
|
||||||
char *tagName = benchCalloc(1, TSDB_MAX_TAGS, true);
|
char *tagName = benchCalloc(1, TSDB_MAX_TAGS, true);
|
||||||
|
|
|
@ -2240,7 +2240,7 @@ static void *syncWriteInterlace(void *sarg) {
|
||||||
snprintf(
|
snprintf(
|
||||||
pThreadInfo->lines[generated],
|
pThreadInfo->lines[generated],
|
||||||
stbInfo->lenOfCols + stbInfo->lenOfTags,
|
stbInfo->lenOfCols + stbInfo->lenOfTags,
|
||||||
"%s %s %" PRId64 "",
|
"%s %s %" PRId64,
|
||||||
pThreadInfo
|
pThreadInfo
|
||||||
->sml_tags[(int)tableSeq -
|
->sml_tags[(int)tableSeq -
|
||||||
pThreadInfo->start_table_from],
|
pThreadInfo->start_table_from],
|
||||||
|
@ -2645,7 +2645,7 @@ static int32_t prepareProgressDataSmlLineOrTelnet(
|
||||||
snprintf(
|
snprintf(
|
||||||
pThreadInfo->lines[j],
|
pThreadInfo->lines[j],
|
||||||
stbInfo->lenOfCols + stbInfo->lenOfTags,
|
stbInfo->lenOfCols + stbInfo->lenOfTags,
|
||||||
"%s %s %" PRId64 "",
|
"%s %s %" PRId64,
|
||||||
pThreadInfo->sml_tags[ti],
|
pThreadInfo->sml_tags[ti],
|
||||||
sampleDataBuf + pos * stbInfo->lenOfCols,
|
sampleDataBuf + pos * stbInfo->lenOfCols,
|
||||||
*timestamp);
|
*timestamp);
|
||||||
|
@ -3473,7 +3473,7 @@ static int64_t fillChildTblNameByCount(SSuperTable *stbInfo) {
|
||||||
char childName[TSDB_TABLE_NAME_LEN]={0};
|
char childName[TSDB_TABLE_NAME_LEN]={0};
|
||||||
snprintf(childName,
|
snprintf(childName,
|
||||||
TSDB_TABLE_NAME_LEN,
|
TSDB_TABLE_NAME_LEN,
|
||||||
"%s%" PRIu64 "",
|
"%s%" PRIu64,
|
||||||
stbInfo->childTblPrefix, i);
|
stbInfo->childTblPrefix, i);
|
||||||
stbInfo->childTblArray[i]->name = strdup(childName);
|
stbInfo->childTblArray[i]->name = strdup(childName);
|
||||||
debugPrint("%s(): %s\n", __func__,
|
debugPrint("%s(): %s\n", __func__,
|
||||||
|
@ -3489,7 +3489,7 @@ static int64_t fillChildTblNameByFromTo(SDataBase *database,
|
||||||
char childName[TSDB_TABLE_NAME_LEN]={0};
|
char childName[TSDB_TABLE_NAME_LEN]={0};
|
||||||
snprintf(childName,
|
snprintf(childName,
|
||||||
TSDB_TABLE_NAME_LEN,
|
TSDB_TABLE_NAME_LEN,
|
||||||
"%s%" PRIu64 "",
|
"%s%" PRIu64,
|
||||||
stbInfo->childTblPrefix, i);
|
stbInfo->childTblPrefix, i);
|
||||||
stbInfo->childTblArray[i]->name = strdup(childName);
|
stbInfo->childTblArray[i]->name = strdup(childName);
|
||||||
}
|
}
|
||||||
|
@ -3507,13 +3507,13 @@ static int64_t fillChildTblNameByLimitOffset(SDataBase *database,
|
||||||
if (g_arguments->taosc_version == 3) {
|
if (g_arguments->taosc_version == 3) {
|
||||||
snprintf(cmd, SHORT_1K_SQL_BUFF_LEN,
|
snprintf(cmd, SHORT_1K_SQL_BUFF_LEN,
|
||||||
"SELECT DISTINCT(TBNAME) FROM %s.`%s` LIMIT %" PRId64
|
"SELECT DISTINCT(TBNAME) FROM %s.`%s` LIMIT %" PRId64
|
||||||
" OFFSET %" PRIu64 "",
|
" OFFSET %" PRIu64,
|
||||||
database->dbName, stbInfo->stbName, stbInfo->childTblLimit,
|
database->dbName, stbInfo->stbName, stbInfo->childTblLimit,
|
||||||
stbInfo->childTblOffset);
|
stbInfo->childTblOffset);
|
||||||
} else {
|
} else {
|
||||||
snprintf(cmd, SHORT_1K_SQL_BUFF_LEN,
|
snprintf(cmd, SHORT_1K_SQL_BUFF_LEN,
|
||||||
"SELECT TBNAME FROM %s.`%s` LIMIT %" PRId64
|
"SELECT TBNAME FROM %s.`%s` LIMIT %" PRId64
|
||||||
" OFFSET %" PRIu64 "",
|
" OFFSET %" PRIu64,
|
||||||
database->dbName, stbInfo->stbName, stbInfo->childTblLimit,
|
database->dbName, stbInfo->stbName, stbInfo->childTblLimit,
|
||||||
stbInfo->childTblOffset);
|
stbInfo->childTblOffset);
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,7 +119,7 @@ int getAllChildNameOfSuperTable(TAOS *taos, char *dbName, char *stbName,
|
||||||
int64_t childTblCountOfSuperTbl) {
|
int64_t childTblCountOfSuperTbl) {
|
||||||
char cmd[SHORT_1K_SQL_BUFF_LEN] = "\0";
|
char cmd[SHORT_1K_SQL_BUFF_LEN] = "\0";
|
||||||
snprintf(cmd, SHORT_1K_SQL_BUFF_LEN,
|
snprintf(cmd, SHORT_1K_SQL_BUFF_LEN,
|
||||||
"select distinct tbname from %s.`%s` limit %" PRId64 "",
|
"select distinct tbname from %s.`%s` limit %" PRId64,
|
||||||
dbName, stbName, childTblCountOfSuperTbl);
|
dbName, stbName, childTblCountOfSuperTbl);
|
||||||
TAOS_RES *res = taos_query(taos, cmd);
|
TAOS_RES *res = taos_query(taos, cmd);
|
||||||
int32_t code = taos_errno(res);
|
int32_t code = taos_errno(res);
|
||||||
|
|
|
@ -1583,7 +1583,7 @@ int processFieldsValueV2(
|
||||||
break;
|
break;
|
||||||
case TSDB_DATA_TYPE_BIGINT:
|
case TSDB_DATA_TYPE_BIGINT:
|
||||||
snprintf(tableDes->cols[index].value, COL_VALUEBUF_LEN,
|
snprintf(tableDes->cols[index].value, COL_VALUEBUF_LEN,
|
||||||
"%" PRId64 "", *((int64_t *)value));
|
"%" PRId64, *((int64_t *)value));
|
||||||
break;
|
break;
|
||||||
case TSDB_DATA_TYPE_UTINYINT:
|
case TSDB_DATA_TYPE_UTINYINT:
|
||||||
snprintf(tableDes->cols[index].value, COL_VALUEBUF_LEN,
|
snprintf(tableDes->cols[index].value, COL_VALUEBUF_LEN,
|
||||||
|
@ -1603,7 +1603,7 @@ int processFieldsValueV2(
|
||||||
break;
|
break;
|
||||||
case TSDB_DATA_TYPE_UBIGINT:
|
case TSDB_DATA_TYPE_UBIGINT:
|
||||||
snprintf(tableDes->cols[index].value, COL_VALUEBUF_LEN,
|
snprintf(tableDes->cols[index].value, COL_VALUEBUF_LEN,
|
||||||
"%" PRIu64 "", *((uint64_t *)value));
|
"%" PRIu64, *((uint64_t *)value));
|
||||||
break;
|
break;
|
||||||
case TSDB_DATA_TYPE_FLOAT:
|
case TSDB_DATA_TYPE_FLOAT:
|
||||||
{
|
{
|
||||||
|
@ -1769,7 +1769,7 @@ int processFieldsValueV2(
|
||||||
break;
|
break;
|
||||||
case TSDB_DATA_TYPE_TIMESTAMP:
|
case TSDB_DATA_TYPE_TIMESTAMP:
|
||||||
snprintf(tableDes->cols[index].value, COL_VALUEBUF_LEN,
|
snprintf(tableDes->cols[index].value, COL_VALUEBUF_LEN,
|
||||||
"%" PRId64 "", *(int64_t *)value);
|
"%" PRId64, *(int64_t *)value);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
errorPrint("%s() LN%d, unknown type: %d\n",
|
errorPrint("%s() LN%d, unknown type: %d\n",
|
||||||
|
@ -3495,7 +3495,7 @@ int64_t queryDbForDumpOutCount(
|
||||||
? "SELECT COUNT(*) FROM `%s`.%s%s%s WHERE _c0 >= %" PRId64 " "
|
? "SELECT COUNT(*) FROM `%s`.%s%s%s WHERE _c0 >= %" PRId64 " "
|
||||||
"AND _c0 <= %" PRId64 ""
|
"AND _c0 <= %" PRId64 ""
|
||||||
: "SELECT COUNT(*) FROM %s.%s%s%s WHERE _c0 >= %" PRId64 " "
|
: "SELECT COUNT(*) FROM %s.%s%s%s WHERE _c0 >= %" PRId64 " "
|
||||||
"AND _c0 <= %" PRId64 "",
|
"AND _c0 <= %" PRId64,
|
||||||
dbName, g_escapeChar, tbName, g_escapeChar,
|
dbName, g_escapeChar, tbName, g_escapeChar,
|
||||||
startTime, endTime);
|
startTime, endTime);
|
||||||
|
|
||||||
|
@ -6648,7 +6648,7 @@ int processResultValue(
|
||||||
|
|
||||||
case TSDB_DATA_TYPE_BIGINT:
|
case TSDB_DATA_TYPE_BIGINT:
|
||||||
return sprintf(pstr + curr_sqlstr_len,
|
return sprintf(pstr + curr_sqlstr_len,
|
||||||
"%" PRId64 "",
|
"%" PRId64,
|
||||||
*((int64_t *)value));
|
*((int64_t *)value));
|
||||||
|
|
||||||
case TSDB_DATA_TYPE_UTINYINT:
|
case TSDB_DATA_TYPE_UTINYINT:
|
||||||
|
@ -6665,7 +6665,7 @@ int processResultValue(
|
||||||
|
|
||||||
case TSDB_DATA_TYPE_UBIGINT:
|
case TSDB_DATA_TYPE_UBIGINT:
|
||||||
return sprintf(pstr + curr_sqlstr_len,
|
return sprintf(pstr + curr_sqlstr_len,
|
||||||
"%" PRIu64 "",
|
"%" PRIu64,
|
||||||
*((uint64_t *)value));
|
*((uint64_t *)value));
|
||||||
|
|
||||||
case TSDB_DATA_TYPE_FLOAT:
|
case TSDB_DATA_TYPE_FLOAT:
|
||||||
|
@ -6710,7 +6710,7 @@ int processResultValue(
|
||||||
}
|
}
|
||||||
case TSDB_DATA_TYPE_TIMESTAMP:
|
case TSDB_DATA_TYPE_TIMESTAMP:
|
||||||
return sprintf(pstr + curr_sqlstr_len,
|
return sprintf(pstr + curr_sqlstr_len,
|
||||||
"%" PRId64 "", *(int64_t *)value);
|
"%" PRId64, *(int64_t *)value);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue