Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added check_void_result.txt
Empty file.
6 changes: 6 additions & 0 deletions include/libs/executor/storageapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,12 @@ typedef struct SStoreMeta {
bool* acquireRes);
int32_t (*putCachedTableList)(void* pVnode, uint64_t suid, const void* pKey, int32_t keyLen, void* pPayload,
int32_t payloadLen, double selectivityRatio);
int32_t (*getStableCachedTableList)(void* pVnode, tb_uid_t suid,
const uint8_t* pTagCondKey, int32_t tagCondKeyLen,
const uint8_t* pKey, int32_t keyLen, SArray* pList1, bool* acquireRes);
int32_t (*putStableCachedTableList)(void* pVnode, uint64_t suid,
const void* pTagCondKey, int32_t tagCondKeyLen,
const void* pKey, int32_t keyLen, SArray* pUidList, SArray* pTagColIds);

int32_t (*metaGetCachedRefDbs)(void* pVnode, tb_uid_t suid, SArray* pList);
int32_t (*metaPutRefDbsToCache)(void* pVnode, tb_uid_t suid, SArray* pList);
Expand Down
1 change: 1 addition & 0 deletions include/os/osEnv.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ extern char tsFMASupported;
extern char tsAVX512Supported;
extern char tsAVX512Enable;
extern char tsTagFilterCache;
extern char tsStableTagFilterCache;

extern char configDir[];
extern char tsDataDir[];
Expand Down
Empty file added insert_res.txt
Empty file.
10 changes: 9 additions & 1 deletion source/common/src/tglobal.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ int32_t tsMaxInsertBatchRows = 1000000;
float tsSelectivityRatio = 1.0;
int32_t tsTagFilterResCacheSize = 1024 * 10;
char tsTagFilterCache = 0;
char tsStableTagFilterCache = 0;

int32_t tsBypassFlag = 0;

Expand Down Expand Up @@ -733,6 +734,9 @@ static int32_t taosAddSystemCfg(SConfig *pCfg) {
TAOS_CHECK_RETURN(cfgAddBool(pCfg, "AVX512Enable", tsAVX512Enable, CFG_SCOPE_BOTH, CFG_DYN_NONE, CFG_CATEGORY_LOCAL));
TAOS_CHECK_RETURN(
cfgAddBool(pCfg, "tagFilterCache", tsTagFilterCache, CFG_SCOPE_BOTH, CFG_DYN_BOTH, CFG_CATEGORY_LOCAL));
TAOS_CHECK_RETURN(
cfgAddBool(pCfg, "stableTagFilterCache", tsStableTagFilterCache,
CFG_SCOPE_SERVER, CFG_DYN_SERVER, CFG_CATEGORY_LOCAL));

TAOS_CHECK_RETURN(
cfgAddInt64(pCfg, "openMax", tsOpenMax, 0, INT64_MAX, CFG_SCOPE_BOTH, CFG_DYN_NONE, CFG_CATEGORY_LOCAL));
Expand Down Expand Up @@ -1665,6 +1669,9 @@ static int32_t taosSetServerCfg(SConfig *pCfg) {
TAOS_CHECK_GET_CFG_ITEM(pCfg, pItem, "tagFilterCache");
tsTagFilterCache = (bool)pItem->bval;

TAOS_CHECK_GET_CFG_ITEM(pCfg, pItem, "stableTagFilterCache");
tsStableTagFilterCache = pItem->bval;

TAOS_CHECK_GET_CFG_ITEM(pCfg, pItem, "slowLogExceptDb");
TAOS_CHECK_RETURN(taosCheckCfgStrValueLen(pItem->name, pItem->str, TSDB_DB_NAME_LEN));
tstrncpy(tsSlowLogExceptDb, pItem->str, TSDB_DB_NAME_LEN);
Expand Down Expand Up @@ -2810,7 +2817,8 @@ static int32_t taosCfgDynamicOptionsForServer(SConfig *pCfg, const char *name) {
{"forceKillTrans", &tsForceKillTrans},
{"enableTLS", &tsEnableTLS},
{"rpcRecvLogThreshold", &tsRpcRecvLogThreshold},
{"tagFilterCache", &tsTagFilterCache}};
{"tagFilterCache", &tsTagFilterCache},
{"stableTagFilterCache", &tsStableTagFilterCache}};

if ((code = taosCfgSetOption(debugOptions, tListLen(debugOptions), pItem, true)) != TSDB_CODE_SUCCESS) {
code = taosCfgSetOption(options, tListLen(options), pItem, false);
Expand Down
15 changes: 15 additions & 0 deletions source/dnode/vnode/inc/vnode.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,21 @@ int32_t metaGetCachedTableUidList(void *pVnode, tb_uid_t suid, const uint8_t *k
bool *acquired);
int32_t metaUidFilterCachePut(void *pVnode, uint64_t suid, const void *pKey, int32_t keyLen, void *pPayload,
int32_t payloadLen, double selectivityRatio);
int32_t metaStableTagFilterCacheGet(void* pVnode, tb_uid_t suid,
const uint8_t* pTagCondKey, int32_t tagCondKeyLen,
const uint8_t* pKey, int32_t keyLen, SArray* pList, bool* acquired);
int32_t metaStableTagFilterCachePut(void* pVnode, uint64_t suid,
const void* pTagCondKey, int32_t tagCondKeyLen,
const void* pKey, int32_t keyLen, SArray* pUidList, SArray* pTagColIds);
int32_t metaStableTagFilterCacheDropSTable(SMeta* pMeta, tb_uid_t suid);
typedef enum {
STABLE_TAG_FILTER_CACHE_DROP_TABLE = 1,
STABLE_TAG_FILTER_CACHE_ADD_TABLE = 2,
} ETagFilterCacheAction;
int32_t metaStableTagFilterCacheUpdateUid(
SMeta* pMeta, const SMetaEntry* pDroppedTable, ETagFilterCacheAction action);
int32_t metaStableTagFilterCacheDropTag(
SMeta* pMeta, tb_uid_t suid, int16_t tagColId);
tb_uid_t metaGetTableEntryUidByName(SMeta *pMeta, const char *name);
int32_t metaGetCachedTbGroup(void *pVnode, tb_uid_t suid, const uint8_t *pKey, int32_t keyLen, SArray **pList);
int32_t metaPutTbGroupToCache(void *pVnode, uint64_t suid, const void *pKey, int32_t keyLen, void *pPayload,
Expand Down
Loading
Loading