“e760df4b1e59f98ee98b084746e3cf781e25cc9e”上不存在“git@gitcode.net:s920243400/PaddleOCR.git”
提交 fcb555b6 编写于 作者: Y yihaoDeng

reduce mem cost

上级 c9a7cadf
...@@ -39,6 +39,7 @@ void tscInitConnCb(void *param, TAOS_RES *result, int code) { ...@@ -39,6 +39,7 @@ void tscInitConnCb(void *param, TAOS_RES *result, int code) {
tscSlowQueryConnInitialized = true; tscSlowQueryConnInitialized = true;
tscSaveSlowQueryFp(sql, NULL); tscSaveSlowQueryFp(sql, NULL);
} }
taos_free_result(result);
} }
void tscAddIntoSqlList(SSqlObj *pSql) { void tscAddIntoSqlList(SSqlObj *pSql) {
...@@ -69,6 +70,7 @@ void tscSaveSlowQueryFpCb(void *param, TAOS_RES *result, int code) { ...@@ -69,6 +70,7 @@ void tscSaveSlowQueryFpCb(void *param, TAOS_RES *result, int code) {
} else { } else {
tscDebug("success to save slow query, code:%d", code); tscDebug("success to save slow query, code:%d", code);
} }
taos_free_result(result);
} }
void tscSaveSlowQueryFp(void *handle, void *tmrId) { void tscSaveSlowQueryFp(void *handle, void *tmrId) {
......
...@@ -2197,6 +2197,7 @@ int32_t tscHandleInsertRetry(SSqlObj* pSql) { ...@@ -2197,6 +2197,7 @@ int32_t tscHandleInsertRetry(SSqlObj* pSql) {
STableDataBlocks* pTableDataBlock = taosArrayGetP(pCmd->pDataBlocks, pSupporter->index); STableDataBlocks* pTableDataBlock = taosArrayGetP(pCmd->pDataBlocks, pSupporter->index);
int32_t code = tscCopyDataBlockToPayload(pSql, pTableDataBlock); int32_t code = tscCopyDataBlockToPayload(pSql, pTableDataBlock);
pCmd->pDataBlocks = tscDestroyBlockArrayList(pCmd->pDataBlocks);
if ((pRes->code = code)!= TSDB_CODE_SUCCESS) { if ((pRes->code = code)!= TSDB_CODE_SUCCESS) {
tscQueueAsyncRes(pSql); tscQueueAsyncRes(pSql);
......
...@@ -147,7 +147,7 @@ void taos_init_imp(void) { ...@@ -147,7 +147,7 @@ void taos_init_imp(void) {
tscObjCache = taosCacheInit(TSDB_CACHE_PTR_KEY, refreshTime / 2, false, tscFreeRegisteredSqlObj, "sqlObj"); tscObjCache = taosCacheInit(TSDB_CACHE_PTR_KEY, refreshTime / 2, false, tscFreeRegisteredSqlObj, "sqlObj");
} }
tscRefId = taosOpenRef(200, tscCloseTscObj); tscRefId = taosOpenRef(500, tscCloseTscObj);
// in other language APIs, taos_cleanup is not available yet. // in other language APIs, taos_cleanup is not available yet.
// So, to make sure taos_cleanup will be invoked to clean up the allocated // So, to make sure taos_cleanup will be invoked to clean up the allocated
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册