From 7c970d18479902716b1f009af03f8b588bc7dc51 Mon Sep 17 00:00:00 2001 From: cadem Date: Sat, 18 Mar 2023 11:16:52 +0800 Subject: [PATCH 01/12] fix/clusterid isolation --- include/util/taoserror.h | 1 + source/dnode/mnode/impl/src/mndDnode.c | 10 ++++++++++ source/libs/sync/src/syncMain.c | 7 +++++++ source/libs/sync/src/syncRequestVote.c | 7 +++++++ 4 files changed, 25 insertions(+) diff --git a/include/util/taoserror.h b/include/util/taoserror.h index 75b71409a8..5d2005233c 100644 --- a/include/util/taoserror.h +++ b/include/util/taoserror.h @@ -223,6 +223,7 @@ int32_t* taosGetErrno(); // #define TSDB_CODE_MND_NOT_READY TAOS_DEF_ERROR_CODE(0, 0x033C) // 2.x // #define TSDB_CODE_MND_DNODE_ID_NOT_CONFIGUREDTAOS_DEF_ERROR_CODE(0, 0x033D) // 2.x // #define TSDB_CODE_MND_DNODE_EP_NOT_CONFIGUREDTAOS_DEF_ERROR_CODE(0, 0x033E) // 2.x +#define TSDB_CODE_MND_DNODE_DIFF_CLUSTER TAOS_DEF_ERROR_CODE(0, 0x033F) // internal // mnode-acct #define TSDB_CODE_MND_ACCT_ALREADY_EXIST TAOS_DEF_ERROR_CODE(0, 0x0340) diff --git a/source/dnode/mnode/impl/src/mndDnode.c b/source/dnode/mnode/impl/src/mndDnode.c index d4a84759c1..d09158b86b 100644 --- a/source/dnode/mnode/impl/src/mndDnode.c +++ b/source/dnode/mnode/impl/src/mndDnode.c @@ -25,6 +25,7 @@ #include "mndUser.h" #include "mndVgroup.h" #include "tmisce.h" +#include "mndCluster.h" #define TSDB_DNODE_VER_NUMBER 1 #define TSDB_DNODE_RESERVE_SIZE 64 @@ -366,6 +367,15 @@ static int32_t mndProcessStatusReq(SRpcMsg *pReq) { goto _OVER; } + int64_t clusterid = mndGetClusterId(pMnode); + if(statusReq.clusterId != 0 && statusReq.clusterId != clusterid) + { + int32_t err = TSDB_CODE_MND_DNODE_DIFF_CLUSTER; + mWarn("dnode:%d, %s, its clusterid:%ld differ from current cluster:%ld, code:0x%x", statusReq.dnodeId, statusReq.dnodeEp, statusReq.clusterId, clusterid, err); + code = TSDB_CODE_MND_DNODE_DIFF_CLUSTER; + goto _OVER; + } + if (statusReq.dnodeId == 0) { pDnode = mndAcquireDnodeByEp(pMnode, statusReq.dnodeEp); if (pDnode == NULL) { diff --git a/source/libs/sync/src/syncMain.c b/source/libs/sync/src/syncMain.c index 90f79fd93c..8bb8f61f46 100644 --- a/source/libs/sync/src/syncMain.c +++ b/source/libs/sync/src/syncMain.c @@ -37,6 +37,7 @@ #include "syncVoteMgr.h" #include "tglobal.h" #include "tref.h" +#include "syncUtil.h" static void syncNodeEqPingTimer(void* param, void* tmrId); static void syncNodeEqElectTimer(void* param, void* tmrId); @@ -2298,6 +2299,12 @@ int32_t syncNodeOnHeartbeat(SSyncNode* ths, const SRpcMsg* pRpcMsg) { pMsgReply->startTime = ths->startTime; pMsgReply->timeStamp = tsMs; + if(CID(&(pMsg->srcId)) != CID(&(ths->myRaftId))) + { + sWarn("vgId:%d, drop heartbeat msg from dnode:%d, because it come from another cluster:%d, differ from current cluster:%d", ths->vgId, DID(&(pMsg->srcId)), CID(&(pMsg->srcId)) , CID(&(ths->myRaftId))); + return 0; + } + if (pMsg->term == currentTerm && ths->state != TAOS_SYNC_STATE_LEADER) { syncIndexMgrSetRecvTime(ths->pNextIndex, &(pMsg->srcId), tsMs); diff --git a/source/libs/sync/src/syncRequestVote.c b/source/libs/sync/src/syncRequestVote.c index 2fda2a19b8..0c3cac21ad 100644 --- a/source/libs/sync/src/syncRequestVote.c +++ b/source/libs/sync/src/syncRequestVote.c @@ -20,6 +20,7 @@ #include "syncRaftStore.h" #include "syncUtil.h" #include "syncVoteMgr.h" +#include "syncUtil.h" // TLA+ Spec // HandleRequestVoteRequest(i, j, m) == @@ -90,6 +91,12 @@ int32_t syncNodeOnRequestVote(SSyncNode* ths, const SRpcMsg* pRpcMsg) { int32_t ret = 0; SyncRequestVote* pMsg = pRpcMsg->pCont; + if(CID(&(pMsg->srcId)) != CID(&(ths->myRaftId))) + { + sWarn("vgId:%d, drop RequestVote msg from dnode:%d, because it come from another cluster:%d, differ from current cluster:%d", ths->vgId, DID(&(pMsg->srcId)), CID(&(pMsg->srcId)) , CID(&(ths->myRaftId))); + return -1; + } + // if already drop replica, do not process if (!syncNodeInRaftGroup(ths, &pMsg->srcId)) { syncLogRecvRequestVote(ths, pMsg, -1, "not in my config"); From 39283d22fb041dd713ac78ece6a6ff2e2f9ea67d Mon Sep 17 00:00:00 2001 From: cadem Date: Sat, 18 Mar 2023 12:59:58 +0800 Subject: [PATCH 02/12] fix/change print format --- source/dnode/mnode/impl/src/mndDnode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/dnode/mnode/impl/src/mndDnode.c b/source/dnode/mnode/impl/src/mndDnode.c index d09158b86b..6e99d11444 100644 --- a/source/dnode/mnode/impl/src/mndDnode.c +++ b/source/dnode/mnode/impl/src/mndDnode.c @@ -371,7 +371,7 @@ static int32_t mndProcessStatusReq(SRpcMsg *pReq) { if(statusReq.clusterId != 0 && statusReq.clusterId != clusterid) { int32_t err = TSDB_CODE_MND_DNODE_DIFF_CLUSTER; - mWarn("dnode:%d, %s, its clusterid:%ld differ from current cluster:%ld, code:0x%x", statusReq.dnodeId, statusReq.dnodeEp, statusReq.clusterId, clusterid, err); + mWarn("dnode:%d, %s, its clusterid:%" PRId64 " differ from current cluster:%" PRId64 ", code:0x%x", statusReq.dnodeId, statusReq.dnodeEp, statusReq.clusterId, clusterid, err); code = TSDB_CODE_MND_DNODE_DIFF_CLUSTER; goto _OVER; } From 39f6ce1694dc192275ad9170bdf11a364b30026d Mon Sep 17 00:00:00 2001 From: cadem Date: Mon, 20 Mar 2023 18:34:20 +0800 Subject: [PATCH 03/12] remove memory leak and syncNodeInRaftGroup --- source/libs/sync/src/syncMain.c | 12 ++++++------ source/libs/sync/src/syncRequestVote.c | 6 ------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/source/libs/sync/src/syncMain.c b/source/libs/sync/src/syncMain.c index 8bb8f61f46..ad8fdbc474 100644 --- a/source/libs/sync/src/syncMain.c +++ b/source/libs/sync/src/syncMain.c @@ -2287,6 +2287,12 @@ int32_t syncNodeOnHeartbeat(SSyncNode* ths, const SRpcMsg* pRpcMsg) { int64_t timeDiff = tsMs - pMsg->timeStamp; syncLogRecvHeartbeat(ths, pMsg, timeDiff, tbuf); + if(!syncNodeInRaftGroup(ths, &pMsg->srcId)) + { + sWarn("vgId:%d, drop heartbeat msg from dnode:%d, because it come from another cluster:%d, differ from current cluster:%d", ths->vgId, DID(&(pMsg->srcId)), CID(&(pMsg->srcId)) , CID(&(ths->myRaftId))); + return 0; + } + SRpcMsg rpcMsg = {0}; (void)syncBuildHeartbeatReply(&rpcMsg, ths->vgId); SyncTerm currentTerm = raftStoreGetTerm(ths); @@ -2299,12 +2305,6 @@ int32_t syncNodeOnHeartbeat(SSyncNode* ths, const SRpcMsg* pRpcMsg) { pMsgReply->startTime = ths->startTime; pMsgReply->timeStamp = tsMs; - if(CID(&(pMsg->srcId)) != CID(&(ths->myRaftId))) - { - sWarn("vgId:%d, drop heartbeat msg from dnode:%d, because it come from another cluster:%d, differ from current cluster:%d", ths->vgId, DID(&(pMsg->srcId)), CID(&(pMsg->srcId)) , CID(&(ths->myRaftId))); - return 0; - } - if (pMsg->term == currentTerm && ths->state != TAOS_SYNC_STATE_LEADER) { syncIndexMgrSetRecvTime(ths->pNextIndex, &(pMsg->srcId), tsMs); diff --git a/source/libs/sync/src/syncRequestVote.c b/source/libs/sync/src/syncRequestVote.c index 0c3cac21ad..6a348d8290 100644 --- a/source/libs/sync/src/syncRequestVote.c +++ b/source/libs/sync/src/syncRequestVote.c @@ -91,12 +91,6 @@ int32_t syncNodeOnRequestVote(SSyncNode* ths, const SRpcMsg* pRpcMsg) { int32_t ret = 0; SyncRequestVote* pMsg = pRpcMsg->pCont; - if(CID(&(pMsg->srcId)) != CID(&(ths->myRaftId))) - { - sWarn("vgId:%d, drop RequestVote msg from dnode:%d, because it come from another cluster:%d, differ from current cluster:%d", ths->vgId, DID(&(pMsg->srcId)), CID(&(pMsg->srcId)) , CID(&(ths->myRaftId))); - return -1; - } - // if already drop replica, do not process if (!syncNodeInRaftGroup(ths, &pMsg->srcId)) { syncLogRecvRequestVote(ths, pMsg, -1, "not in my config"); From 0c0edd6a397357bd701ea0e84fc2c79344b3c7b9 Mon Sep 17 00:00:00 2001 From: shenglian zhou Date: Wed, 22 Mar 2023 15:27:11 +0800 Subject: [PATCH 04/12] fix: udf agg can not return null values --- source/libs/function/src/tudf.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/source/libs/function/src/tudf.c b/source/libs/function/src/tudf.c index 8f5cd070dc..a70dc28b8f 100644 --- a/source/libs/function/src/tudf.c +++ b/source/libs/function/src/tudf.c @@ -1187,14 +1187,19 @@ int32_t udfAggFinalize(struct SqlFunctionCtx *pCtx, SSDataBlock *pBlock) { fnError("udfAggFinalize error. doCallUdfAggFinalize step. udf code:%d", udfCallCode); GET_RES_INFO(pCtx)->numOfRes = 0; } else { - if (resultBuf.bufLen <= session->outputLen) { - memcpy(udfRes->finalResBuf, resultBuf.buf, session->outputLen); - udfRes->finalResNum = resultBuf.numOfResult; - GET_RES_INFO(pCtx)->numOfRes = udfRes->finalResNum; - } else { - fnError("udfc inter buf size %d is greater than function output size %d", resultBuf.bufLen, session->outputLen); + if (resultBuf.numOfResult == 0) { + udfRes->finalResNum = 0; GET_RES_INFO(pCtx)->numOfRes = 0; - udfCallCode = TSDB_CODE_UDF_INVALID_OUTPUT_TYPE; + } else { + if (resultBuf.bufLen <= session->outputLen) { + memcpy(udfRes->finalResBuf, resultBuf.buf, resultBuf.bufLen); + udfRes->finalResNum = resultBuf.numOfResult; + GET_RES_INFO(pCtx)->numOfRes = udfRes->finalResNum; + } else { + fnError("udfc inter buf size %d is greater than function output size %d", resultBuf.bufLen, session->bytes); + GET_RES_INFO(pCtx)->numOfRes = 0; + udfCallCode = TSDB_CODE_UDF_INVALID_OUTPUT_TYPE; + } } } From 8d1224ce2225dab92667b41e105f6006a1c83826 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Thu, 23 Mar 2023 22:31:20 +0800 Subject: [PATCH 05/12] refactor: format code --- source/dnode/mnode/impl/src/mndDnode.c | 7 +++---- source/libs/sync/src/syncMain.c | 8 +++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/source/dnode/mnode/impl/src/mndDnode.c b/source/dnode/mnode/impl/src/mndDnode.c index 6e99d11444..a911360e80 100644 --- a/source/dnode/mnode/impl/src/mndDnode.c +++ b/source/dnode/mnode/impl/src/mndDnode.c @@ -368,11 +368,10 @@ static int32_t mndProcessStatusReq(SRpcMsg *pReq) { } int64_t clusterid = mndGetClusterId(pMnode); - if(statusReq.clusterId != 0 && statusReq.clusterId != clusterid) - { - int32_t err = TSDB_CODE_MND_DNODE_DIFF_CLUSTER; - mWarn("dnode:%d, %s, its clusterid:%" PRId64 " differ from current cluster:%" PRId64 ", code:0x%x", statusReq.dnodeId, statusReq.dnodeEp, statusReq.clusterId, clusterid, err); + if (statusReq.clusterId != 0 && statusReq.clusterId != clusterid) { code = TSDB_CODE_MND_DNODE_DIFF_CLUSTER; + mWarn("dnode:%d, %s, its clusterid:%" PRId64 " differ from current cluster:%" PRId64 ", code:0x%x", + statusReq.dnodeId, statusReq.dnodeEp, statusReq.clusterId, clusterid, code); goto _OVER; } diff --git a/source/libs/sync/src/syncMain.c b/source/libs/sync/src/syncMain.c index ad8fdbc474..d48d9f14ad 100644 --- a/source/libs/sync/src/syncMain.c +++ b/source/libs/sync/src/syncMain.c @@ -2287,9 +2287,11 @@ int32_t syncNodeOnHeartbeat(SSyncNode* ths, const SRpcMsg* pRpcMsg) { int64_t timeDiff = tsMs - pMsg->timeStamp; syncLogRecvHeartbeat(ths, pMsg, timeDiff, tbuf); - if(!syncNodeInRaftGroup(ths, &pMsg->srcId)) - { - sWarn("vgId:%d, drop heartbeat msg from dnode:%d, because it come from another cluster:%d, differ from current cluster:%d", ths->vgId, DID(&(pMsg->srcId)), CID(&(pMsg->srcId)) , CID(&(ths->myRaftId))); + if (!syncNodeInRaftGroup(ths, &pMsg->srcId)) { + sWarn( + "vgId:%d, drop heartbeat msg from dnode:%d, because it come from another cluster:%d, differ from current " + "cluster:%d", + ths->vgId, DID(&(pMsg->srcId)), CID(&(pMsg->srcId)), CID(&(ths->myRaftId))); return 0; } From 3bdef853b2b03a3df53be9fc64a5073ddcb38f32 Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Fri, 24 Mar 2023 10:29:36 +0800 Subject: [PATCH 06/12] fix: fix windows handling localtime_s error --- source/os/src/osTime.c | 7 +++++++ tools/shell/src/shellEngine.c | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/source/os/src/osTime.c b/source/os/src/osTime.c index 685693a709..c0f4bc7d3e 100644 --- a/source/os/src/osTime.c +++ b/source/os/src/osTime.c @@ -33,6 +33,7 @@ #include //#define TM_YEAR_BASE 1970 //origin #define TM_YEAR_BASE 1900 // slguan +#define _MAX__TIME64_T 0x793406fffi64 // This magic number is the number of 100 nanosecond intervals since January 1, 1601 (UTC) // until 00:00:00 January 1, 1970 @@ -444,6 +445,9 @@ struct tm *taosLocalTime(const time_t *timep, struct tm *result) { result->tm_yday = 0; result->tm_isdst = 0; } else { + if (*timep > _MAX__TIME64_T) { + return NULL; + } localtime_s(result, timep); } #else @@ -500,6 +504,9 @@ struct tm *taosLocalTimeNolock(struct tm *result, const time_t *timep, int dst) result->tm_yday = 0; result->tm_isdst = 0; } else { + if (*timep > _MAX__TIME64_T) { + return NULL; + } localtime_s(result, timep); } #elif defined(LINUX) diff --git a/tools/shell/src/shellEngine.c b/tools/shell/src/shellEngine.c index 3080b15b8c..e732d42082 100644 --- a/tools/shell/src/shellEngine.c +++ b/tools/shell/src/shellEngine.c @@ -291,7 +291,10 @@ char *shellFormatTimestamp(char *buf, int64_t val, int32_t precision) { } struct tm ptm = {0}; - taosLocalTime(&tt, &ptm); + if (taosLocalTime(&tt, &ptm) == NULL) { + sprintf(buf, "%s", "NaN"); + return buf; + } size_t pos = strftime(buf, 35, "%Y-%m-%d %H:%M:%S", &ptm); if (precision == TSDB_TIME_PRECISION_NANO) { From 6f119ef4d0c70946842410e5b7e367e77bd290b8 Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Fri, 24 Mar 2023 11:24:04 +0800 Subject: [PATCH 07/12] change print format --- tools/shell/src/shellEngine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/shell/src/shellEngine.c b/tools/shell/src/shellEngine.c index e732d42082..a87ba16267 100644 --- a/tools/shell/src/shellEngine.c +++ b/tools/shell/src/shellEngine.c @@ -292,7 +292,7 @@ char *shellFormatTimestamp(char *buf, int64_t val, int32_t precision) { struct tm ptm = {0}; if (taosLocalTime(&tt, &ptm) == NULL) { - sprintf(buf, "%s", "NaN"); + sprintf(buf, "NaN"); return buf; } size_t pos = strftime(buf, 35, "%Y-%m-%d %H:%M:%S", &ptm); From 223ae4cc7e1b2da71d4d0aa2c9ed1d4d38375f72 Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Fri, 24 Mar 2023 14:50:56 +0800 Subject: [PATCH 08/12] fix --- source/os/src/osTime.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/os/src/osTime.c b/source/os/src/osTime.c index c0f4bc7d3e..f0ab91f9c5 100644 --- a/source/os/src/osTime.c +++ b/source/os/src/osTime.c @@ -33,7 +33,6 @@ #include //#define TM_YEAR_BASE 1970 //origin #define TM_YEAR_BASE 1900 // slguan -#define _MAX__TIME64_T 0x793406fffi64 // This magic number is the number of 100 nanosecond intervals since January 1, 1601 (UTC) // until 00:00:00 January 1, 1970 @@ -419,7 +418,9 @@ struct tm *taosLocalTime(const time_t *timep, struct tm *result) { LARGE_INTEGER offset; struct tm tm1; time_t tt = 0; - localtime_s(&tm1, &tt); + if (localtime_s(&tm1, &tt) != 0 ) { + return NULL; + } ss.wYear = tm1.tm_year + 1900; ss.wMonth = tm1.tm_mon + 1; ss.wDay = tm1.tm_mday; @@ -445,10 +446,9 @@ struct tm *taosLocalTime(const time_t *timep, struct tm *result) { result->tm_yday = 0; result->tm_isdst = 0; } else { - if (*timep > _MAX__TIME64_T) { + if (localtime_s(result, timep) != 0) { return NULL; } - localtime_s(result, timep); } #else localtime_r(timep, result); From b06e9e10313d085168470362d3b6731dbe3ce7af Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Fri, 24 Mar 2023 14:50:56 +0800 Subject: [PATCH 09/12] fix --- source/os/src/osTime.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/os/src/osTime.c b/source/os/src/osTime.c index f0ab91f9c5..28be12e908 100644 --- a/source/os/src/osTime.c +++ b/source/os/src/osTime.c @@ -478,7 +478,9 @@ struct tm *taosLocalTimeNolock(struct tm *result, const time_t *timep, int dst) LARGE_INTEGER offset; struct tm tm1; time_t tt = 0; - localtime_s(&tm1, &tt); + if (localtime_s(&tm1, &tt) != 0) { + return NULL; + } ss.wYear = tm1.tm_year + 1900; ss.wMonth = tm1.tm_mon + 1; ss.wDay = tm1.tm_mday; @@ -504,10 +506,9 @@ struct tm *taosLocalTimeNolock(struct tm *result, const time_t *timep, int dst) result->tm_yday = 0; result->tm_isdst = 0; } else { - if (*timep > _MAX__TIME64_T) { + if (localtime_s(result, timep) != 0) { return NULL; } - localtime_s(result, timep); } #elif defined(LINUX) time_t secsMin = 60, secsHour = 3600, secsDay = 3600 * 24; From 9788532a0ab81e05e36e5b340ceb3ff239ec2ad1 Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Fri, 24 Mar 2023 14:50:56 +0800 Subject: [PATCH 10/12] fix --- source/os/src/osTime.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/os/src/osTime.c b/source/os/src/osTime.c index 28be12e908..5d5bff8c48 100644 --- a/source/os/src/osTime.c +++ b/source/os/src/osTime.c @@ -413,6 +413,8 @@ struct tm *taosLocalTime(const time_t *timep, struct tm *result) { } #ifdef WINDOWS if (*timep < 0) { + return NULL; + // TODO: bugs in following code SYSTEMTIME ss, s; FILETIME ff, f; LARGE_INTEGER offset; @@ -473,6 +475,8 @@ struct tm *taosLocalTimeNolock(struct tm *result, const time_t *timep, int dst) } #ifdef WINDOWS if (*timep < 0) { + return NULL; + // TODO: bugs in following code SYSTEMTIME ss, s; FILETIME ff, f; LARGE_INTEGER offset; From 6d04d5f29f648e1486d9e5c267ab810b133efe9a Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Fri, 24 Mar 2023 17:59:05 +0800 Subject: [PATCH 11/12] fix: taosbenchmark same min max (#20619) * fix: taosbenchmark support same min/max * fix: taosbenchmark support same min/max --- cmake/taostools_CMakeLists.txt.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/taostools_CMakeLists.txt.in b/cmake/taostools_CMakeLists.txt.in index 87f0579f44..897ccdd158 100644 --- a/cmake/taostools_CMakeLists.txt.in +++ b/cmake/taostools_CMakeLists.txt.in @@ -2,7 +2,7 @@ # taos-tools ExternalProject_Add(taos-tools GIT_REPOSITORY https://github.com/taosdata/taos-tools.git - GIT_TAG d11f210 + GIT_TAG 04296a5 SOURCE_DIR "${TD_SOURCE_DIR}/tools/taos-tools" BINARY_DIR "" #BUILD_IN_SOURCE TRUE From 484e116720a574a956f260882c39c840e6a8cc54 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Fri, 24 Mar 2023 18:34:26 +0800 Subject: [PATCH 12/12] docs: refine en/13-operation/01-pkg-install.md (#20631) --- docs/en/13-operation/01-pkg-install.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/en/13-operation/01-pkg-install.md b/docs/en/13-operation/01-pkg-install.md index 86823e2824..5610139471 100644 --- a/docs/en/13-operation/01-pkg-install.md +++ b/docs/en/13-operation/01-pkg-install.md @@ -15,14 +15,14 @@ About details of installing TDenine, please refer to [Installation Guide](../../ ## Uninstall - + -Apt-get package of TDengine can be uninstalled as below: +Uninstall package of TDengine by apt-get can be uninstalled as below: ```bash $ sudo apt-get remove tdengine Reading package lists... Done -Building dependency tree +Building dependency tree Reading state information... Done The following packages will be REMOVED: tdengine @@ -35,7 +35,7 @@ TDengine is removed successfully! ``` -Apt-get package of taosTools can be uninstalled as below: +If you have installed taos-tools, please uninstall it first before uninstall TDengine. The command of uninstall is following: ``` $ sudo apt remove taostools @@ -168,7 +168,7 @@ Upgrading a running server is much more complex. First please check the version - Stop the cluster of TDengine - Uninstall old version and install new version - Start the cluster of TDengine -- Execute simple queries, such as the ones executed prior to installing the new package, to make sure there is no data loss +- Execute simple queries, such as the ones executed prior to installing the new package, to make sure there is no data loss - Run some simple data insertion statements to make sure the cluster works well - Restore business services