From bc1f9bca93539978f751140a7d45f955c9b5f0a7 Mon Sep 17 00:00:00 2001 From: kailixu Date: Sun, 28 Apr 2024 11:07:53 +0800 Subject: [PATCH] enh: batch create table --- source/dnode/mgmt/mgmt_dnode/src/dmWorker.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/dnode/mgmt/mgmt_dnode/src/dmWorker.c b/source/dnode/mgmt/mgmt_dnode/src/dmWorker.c index 64588c6790..c9f8801ceb 100644 --- a/source/dnode/mgmt/mgmt_dnode/src/dmWorker.c +++ b/source/dnode/mgmt/mgmt_dnode/src/dmWorker.c @@ -68,6 +68,7 @@ static void *dmNotifyThreadFp(void *param) { bool wait = true; int32_t nDnode = 0; int64_t lastNotify = 0; + int64_t lastFetchDnode = 0; SNotifyReq req = {0}; while (1) { if (pMgmt->pData->dropped || pMgmt->pData->stopped) break; @@ -79,9 +80,10 @@ static void *dmNotifyThreadFp(void *param) { goto _skip; } int64_t current = taosGetTimestampMs(); - if (current - lastNotify > 1000) { + if (current - lastFetchDnode > 1000) { nDnode = dmGetDnodeSize(pMgmt->pData); if (nDnode < 1) nDnode = 1; + lastFetchDnode = current; } if (req.dnodeId == 0 || req.clusterId == 0) { req.dnodeId = pMgmt->pData->dnodeId;