[td-225] refactor code.
This commit is contained in:
parent
6634c97552
commit
83a1d5e54e
|
@ -141,7 +141,7 @@ void taos_init_imp(void) {
|
||||||
int64_t refreshTime = 10; // 10 seconds by default
|
int64_t refreshTime = 10; // 10 seconds by default
|
||||||
if (tscMetaCache == NULL) {
|
if (tscMetaCache == NULL) {
|
||||||
tscMetaCache = taosCacheInit(TSDB_DATA_TYPE_BINARY, refreshTime, false, NULL, "tableMeta");
|
tscMetaCache = taosCacheInit(TSDB_DATA_TYPE_BINARY, refreshTime, false, NULL, "tableMeta");
|
||||||
tscObjCache = taosCacheInit(TSDB_CACHE_PTR_KEY, refreshTime / 2, false, tscFreeSqlObjInCache, "sqlObj");
|
tscObjCache = taosCacheInit(TSDB_CACHE_PTR_KEY, refreshTime / 2, false, tscFreeRegisteredSqlObj, "sqlObj");
|
||||||
}
|
}
|
||||||
|
|
||||||
tscDebug("client is initialized successfully");
|
tscDebug("client is initialized successfully");
|
||||||
|
|
|
@ -389,7 +389,7 @@ static void tscFreeSubobj(SSqlObj* pSql) {
|
||||||
*
|
*
|
||||||
* @param pSql
|
* @param pSql
|
||||||
*/
|
*/
|
||||||
void tscFreeSqlObjInCache(void *pSql) {
|
void tscFreeRegisteredSqlObj(void *pSql) {
|
||||||
assert(pSql != NULL);
|
assert(pSql != NULL);
|
||||||
|
|
||||||
SSqlObj** p = (SSqlObj**)pSql;
|
SSqlObj** p = (SSqlObj**)pSql;
|
||||||
|
|
Loading…
Reference in New Issue