From 10fd86209d97edf2254d0caec646a908d4e4d8e6 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Wed, 2 Mar 2022 14:10:27 +0800 Subject: [PATCH] minor changes --- include/os/osSysinfo.h | 1 - source/dnode/mgmt/impl/src/dndEnv.c | 21 +++------------------ source/dnode/vnode/inc/vnode.h | 4 ---- source/os/src/osSysinfo.c | 3 --- 4 files changed, 3 insertions(+), 26 deletions(-) diff --git a/include/os/osSysinfo.h b/include/os/osSysinfo.h index 35ac032a8a..bf9d7662e6 100644 --- a/include/os/osSysinfo.h +++ b/include/os/osSysinfo.h @@ -42,7 +42,6 @@ bool taosGetCpuUsage(float *sysCpuUsage, float *procCpuUsage); bool taosGetTotalSysMemoryKB(uint64_t *kb); bool taosGetProcMemory(float *memoryUsedMB); // bool taosGetSysMemory(float *memoryUsedMB); // -void taosGetDisk(); int32_t taosGetDiskSize(char *dataDir, SDiskSize *diskSize); bool taosReadProcIO(int64_t *rchars, int64_t *wchars); bool taosGetProcIO(float *readKB, float *writeKB); diff --git a/source/dnode/mgmt/impl/src/dndEnv.c b/source/dnode/mgmt/impl/src/dndEnv.c index 9467b56e6b..9f6c22067d 100644 --- a/source/dnode/mgmt/impl/src/dndEnv.c +++ b/source/dnode/mgmt/impl/src/dndEnv.c @@ -288,12 +288,9 @@ int32_t dndInit() { return -1; } - SVnodeOpt vnodeOpt = { - .sver = tsVersion, - .nthreads = tsNumOfCommitThreads, - .putReqToVQueryQFp = dndPutReqToVQueryQ, - .sendReqToDnodeFp = dndSendReqToDnode - }; + SVnodeOpt vnodeOpt = {.nthreads = tsNumOfCommitThreads, + .putReqToVQueryQFp = dndPutReqToVQueryQ, + .sendReqToDnodeFp = dndSendReqToDnode}; if (vnodeInit(&vnodeOpt) != 0) { dError("failed to init vnode since %s", terrstr()); @@ -318,15 +315,3 @@ void dndCleanup() { taosStopCacheRefreshWorker(); dInfo("dnode env is cleaned up"); } - -// OTHER FUNCTIONS =================================== -void taosGetDisk() { -#if 0 - const double unit = 1024 * 1024 * 1024; - - SDiskSize diskSize = tfsGetSize(pTfs); - - tfsUpdateSize(&fsMeta); - -#endif -} \ No newline at end of file diff --git a/source/dnode/vnode/inc/vnode.h b/source/dnode/vnode/inc/vnode.h index 31f04e840a..b5b53d9361 100644 --- a/source/dnode/vnode/inc/vnode.h +++ b/source/dnode/vnode/inc/vnode.h @@ -60,10 +60,6 @@ typedef struct { } SVnodeCfg; typedef struct { - int32_t sver; - const char *timezone; - const char *locale; - const char *charset; uint16_t nthreads; // number of commit threads. 0 for no threads and a schedule queue should be given (TODO) PutReqToVQueryQFp putReqToVQueryQFp; SendReqToDnodeFp sendReqToDnodeFp; diff --git a/source/os/src/osSysinfo.c b/source/os/src/osSysinfo.c index 163fad803f..3e761c6d91 100644 --- a/source/os/src/osSysinfo.c +++ b/source/os/src/osSysinfo.c @@ -167,11 +167,9 @@ void taosGetSystemInfo() { tsTotalMemoryMB = taosGetTotalMemory(); float tmp1, tmp2; - // taosGetDisk(); taosGetBandSpeed(&tmp1); taosGetCpuUsage(&tmp1, &tmp2); taosGetProcIO(&tmp1, &tmp2); - } void taosKillSystem() { @@ -712,7 +710,6 @@ void taosGetSystemInfo() { float tmp1, tmp2; taosGetSysMemory(&tmp1); taosGetProcMemory(&tmp2); - // taosGetDisk(); taosGetBandSpeed(&tmp1); taosGetCpuUsage(&tmp1, &tmp2); taosGetProcIO(&tmp1, &tmp2);