Skip to content

Commit

Permalink
Merge pull request #27869 from taosdata/postfix/m/TD-31994
Browse files Browse the repository at this point in the history
postfix conn/app cache check time
  • Loading branch information
dapan1121 authored Sep 14, 2024
2 parents 5b4953d + 8f27c19 commit dd1c3c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/dnode/mnode/impl/src/mndProfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,13 @@ static int32_t mndRetrieveApps(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB
static void mndCancelGetNextApp(SMnode *pMnode, void *pIter);
static int32_t mndProcessSvrVerReq(SRpcMsg *pReq);

#define CACHE_OBJ_KEEP_TIME 3 // s

int32_t mndInitProfile(SMnode *pMnode) {
SProfileMgmt *pMgmt = &pMnode->profileMgmt;

// in ms
int32_t checkTime = tsShellActivityTimer * 2 * 1000;
int32_t checkTime = CACHE_OBJ_KEEP_TIME * 1000;
pMgmt->connCache = taosCacheInit(TSDB_DATA_TYPE_UINT, checkTime, false, (__cache_free_fn_t)mndFreeConn, "conn");
if (pMgmt->connCache == NULL) {
terrno = TSDB_CODE_OUT_OF_MEMORY;
Expand Down Expand Up @@ -132,8 +134,6 @@ void mndCleanupProfile(SMnode *pMnode) {
}
}

#define CACHE_OBJ_KEEP_TIME 3 // s

static SConnObj *mndCreateConn(SMnode *pMnode, const char *user, int8_t connType, uint32_t ip, uint16_t port,
int32_t pid, const char *app, int64_t startTime) {
SProfileMgmt *pMgmt = &pMnode->profileMgmt;
Expand Down

0 comments on commit dd1c3c2

Please sign in to comment.