[TD-4199]<feature> enhance performance

This commit is contained in:
yihaoDeng 2021-08-04 13:06:52 +08:00
parent 13e6a9faf7
commit 1dc7859b62
2 changed files with 3 additions and 5 deletions

View File

@ -2845,10 +2845,8 @@ int32_t tscGetTableMetaImpl(SSqlObj* pSql, STableMetaInfo *pTableMetaInfo, bool
size_t len = strlen(name);
// just make runtime happy
if (pTableMetaInfo->tableMetaCapacity != 0) {
if (pTableMetaInfo->pTableMeta != NULL) {
memset(pTableMetaInfo->pTableMeta, 0, pTableMetaInfo->tableMetaCapacity);
}
if (pTableMetaInfo->tableMetaCapacity != 0 && pTableMetaInfo->pTableMeta != NULL) {
memset(pTableMetaInfo->pTableMeta, 0, pTableMetaInfo->tableMetaCapacity);
}
taosHashGetCloneExt(tscTableMetaMap, name, len, NULL, (void **)&(pTableMetaInfo->pTableMeta), &pTableMetaInfo->tableMetaCapacity);

View File

@ -18,7 +18,7 @@
#include "tulog.h"
#include "taosdef.h"
#define EXT_SIZE 0
#define EXT_SIZE 1024
#define HASH_NEED_RESIZE(_h) ((_h)->size >= (_h)->capacity * HASH_DEFAULT_LOAD_FACTOR)