[TD-4199]<feature> enhance performance
This commit is contained in:
parent
13e6a9faf7
commit
1dc7859b62
|
@ -2845,11 +2845,9 @@ int32_t tscGetTableMetaImpl(SSqlObj* pSql, STableMetaInfo *pTableMetaInfo, bool
|
||||||
|
|
||||||
size_t len = strlen(name);
|
size_t len = strlen(name);
|
||||||
// just make runtime happy
|
// just make runtime happy
|
||||||
if (pTableMetaInfo->tableMetaCapacity != 0) {
|
if (pTableMetaInfo->tableMetaCapacity != 0 && pTableMetaInfo->pTableMeta != NULL) {
|
||||||
if (pTableMetaInfo->pTableMeta != NULL) {
|
|
||||||
memset(pTableMetaInfo->pTableMeta, 0, pTableMetaInfo->tableMetaCapacity);
|
memset(pTableMetaInfo->pTableMeta, 0, pTableMetaInfo->tableMetaCapacity);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
taosHashGetCloneExt(tscTableMetaMap, name, len, NULL, (void **)&(pTableMetaInfo->pTableMeta), &pTableMetaInfo->tableMetaCapacity);
|
taosHashGetCloneExt(tscTableMetaMap, name, len, NULL, (void **)&(pTableMetaInfo->pTableMeta), &pTableMetaInfo->tableMetaCapacity);
|
||||||
|
|
||||||
STableMeta* pMeta = pTableMetaInfo->pTableMeta;
|
STableMeta* pMeta = pTableMetaInfo->pTableMeta;
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
#include "tulog.h"
|
#include "tulog.h"
|
||||||
#include "taosdef.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)
|
#define HASH_NEED_RESIZE(_h) ((_h)->size >= (_h)->capacity * HASH_DEFAULT_LOAD_FACTOR)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue