From 3b504e6e968e0ff7a9ea05a7bd2ff0cf246acefe Mon Sep 17 00:00:00 2001 From: kailixu Date: Sun, 28 Apr 2024 04:47:00 +0800 Subject: [PATCH] enh: batch create table --- include/common/tgrant.h | 12 ++++++------ source/dnode/mgmt/mgmt_dnode/src/dmWorker.c | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/common/tgrant.h b/include/common/tgrant.h index f7759177da..5a2ed58045 100644 --- a/include/common/tgrant.h +++ b/include/common/tgrant.h @@ -58,12 +58,12 @@ typedef enum { TSDB_GRANT_BACKUP_RESTORE, } EGrantType; -int32_t checkAndGetCryptKey(const char *encryptCode, const char *machineId, char **key); -int32_t generateEncryptCode(const char *key, const char *machineId, char **encryptCode); -uint64_t grantRemain(EGrantType grant); -int32_t grantCheck(EGrantType grant); -int32_t grantCheckExpire(EGrantType grant); -char *tGetMachineId(); +int32_t checkAndGetCryptKey(const char *encryptCode, const char *machineId, char **key); +int32_t generateEncryptCode(const char *key, const char *machineId, char **encryptCode); +int64_t grantRemain(EGrantType grant); +int32_t grantCheck(EGrantType grant); +int32_t grantCheckExpire(EGrantType grant); +char *tGetMachineId(); // #ifndef GRANTS_CFG #ifdef TD_ENTERPRISE diff --git a/source/dnode/mgmt/mgmt_dnode/src/dmWorker.c b/source/dnode/mgmt/mgmt_dnode/src/dmWorker.c index 48a0c6b755..5ee4434b07 100644 --- a/source/dnode/mgmt/mgmt_dnode/src/dmWorker.c +++ b/source/dnode/mgmt/mgmt_dnode/src/dmWorker.c @@ -74,7 +74,7 @@ static void *dmNotifyThreadFp(void *param) { if (wait) tsem_wait(&dmNotifyHdl.sem); atomic_store_8(&dmNotifyHdl.state, 1); - uint64_t remainTimeSeries = grantRemain(TSDB_GRANT_TIMESERIES); + int64_t remainTimeSeries = grantRemain(TSDB_GRANT_TIMESERIES); if (remainTimeSeries == INT64_MAX || remainTimeSeries <= 0) { goto _skip; } @@ -110,7 +110,7 @@ static void *dmNotifyThreadFp(void *param) { notifyTimeStamp[tail] = taosGetTimestampNs(); ++nTotalNotify; - uint64_t approximateTimeSeries = 0; + int64_t approximateTimeSeries = 0; if (nTotalNotify >= TIMESERIES_STASH_NUM) { int64_t timeDiff = notifyTimeStamp[tail] - notifyTimeStamp[head]; int64_t tsDiff = notifyTimeSeries[tail] - notifyTimeSeries[head];