From 6b066bcf1a809b5d65873ed9929fed5b5ace80ba Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Sun, 8 Nov 2020 14:46:12 +0000 Subject: [PATCH 1/5] TD-1919 --- src/inc/tsdb.h | 4 ++-- src/mnode/src/mnodeSdb.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/inc/tsdb.h b/src/inc/tsdb.h index 02ca99e4b8..3ef618ab36 100644 --- a/src/inc/tsdb.h +++ b/src/inc/tsdb.h @@ -126,7 +126,7 @@ uint32_t tsdbGetFileInfo(TSDB_REPO_T *repo, char *name, uint32_t *index, uint32_ // the TSDB repository info typedef struct STsdbRepoInfo { STsdbCfg tsdbCfg; - int64_t version; // version of the repository + uint64_t version; // version of the repository int64_t tsdbTotalDataSize; // the original inserted data size int64_t tsdbTotalDiskSize; // the total disk size taken by this TSDB repository // TODO: Other informations to add @@ -136,7 +136,7 @@ STsdbRepoInfo *tsdbGetStatus(TSDB_REPO_T *pRepo); // the meter information report structure typedef struct { STableCfg tableCfg; - int64_t version; + uint64_t version; int64_t tableTotalDataSize; // In bytes int64_t tableTotalDiskSize; // In bytes } STableInfo; diff --git a/src/mnode/src/mnodeSdb.c b/src/mnode/src/mnodeSdb.c index 6b6a49db93..e5c8b752b5 100644 --- a/src/mnode/src/mnodeSdb.c +++ b/src/mnode/src/mnodeSdb.c @@ -71,7 +71,7 @@ typedef struct _SSdbTable { typedef struct { ESyncRole role; ESdbStatus status; - int64_t version; + uint64_t version; int64_t sync; void * wal; SSyncCfg cfg; From c26e1a907601efadce679116e413c4d4fb26d919 Mon Sep 17 00:00:00 2001 From: Minglei Jin Date: Fri, 13 Nov 2020 00:55:11 -0500 Subject: [PATCH 2/5] [TD-1986]: default days to 10 instead of 2 --- src/inc/taosdef.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/inc/taosdef.h b/src/inc/taosdef.h index 875092b88d..35ee468ce0 100644 --- a/src/inc/taosdef.h +++ b/src/inc/taosdef.h @@ -334,7 +334,7 @@ void tsDataSwap(void *pLeft, void *pRight, int32_t type, int32_t size, void* buf #define TSDB_MIN_DAYS_PER_FILE 1 #define TSDB_MAX_DAYS_PER_FILE 3650 -#define TSDB_DEFAULT_DAYS_PER_FILE 2 +#define TSDB_DEFAULT_DAYS_PER_FILE 10 #define TSDB_MIN_KEEP 1 // data in db to be reserved. #define TSDB_MAX_KEEP 365000 // data in db to be reserved. From e3d3c2d18d91f730d1c856fdea14b78976d34ddb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 13 Nov 2020 06:56:51 +0000 Subject: [PATCH 3/5] Bump c3p0 in /tests/examples/JDBC/connectionPools Bumps [c3p0](https://github.com/swaldman/c3p0) from 0.9.5.2 to 0.9.5.4. - [Release notes](https://github.com/swaldman/c3p0/releases) - [Commits](https://github.com/swaldman/c3p0/compare/c3p0-0.9.5.2...c3p0-0.9.5.4) Signed-off-by: dependabot[bot] --- tests/examples/JDBC/connectionPools/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/examples/JDBC/connectionPools/pom.xml b/tests/examples/JDBC/connectionPools/pom.xml index d117c59637..2793f0a83d 100644 --- a/tests/examples/JDBC/connectionPools/pom.xml +++ b/tests/examples/JDBC/connectionPools/pom.xml @@ -42,7 +42,7 @@ com.mchange c3p0 - 0.9.5.2 + 0.9.5.4 From fa7f625f0578e18694a291dcb8b7d952dd2bac3b Mon Sep 17 00:00:00 2001 From: Hui Li Date: Fri, 13 Nov 2020 15:01:20 +0800 Subject: [PATCH 4/5] [update] --- src/connector/go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connector/go b/src/connector/go index 8c58c512b6..66df175edf 160000 --- a/src/connector/go +++ b/src/connector/go @@ -1 +1 @@ -Subproject commit 8c58c512b6acda8bcdfa48fdc7140227b5221766 +Subproject commit 66df175edf467df6f80d07789f1a35a6d2551310 From 3a9b5392134dfa7bc9f6d96a3ef4ac8dc1896e51 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Fri, 13 Nov 2020 09:44:22 +0000 Subject: [PATCH 5/5] TD-1948 --- src/sync/src/syncMain.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/sync/src/syncMain.c b/src/sync/src/syncMain.c index 8d90315c48..766dbaf174 100644 --- a/src/sync/src/syncMain.c +++ b/src/sync/src/syncMain.c @@ -1209,13 +1209,16 @@ static int32_t syncForwardToPeerImpl(SSyncNode *pNode, void *data, void *mhandle int32_t fwdLen; int32_t code = 0; - if (nodeRole == TAOS_SYNC_ROLE_SLAVE && pWalHead->version != nodeVersion + 1) { - sError("vgId:%d, received ver:%" PRIu64 ", inconsistent with last ver:%" PRIu64 ", restart connection", pNode->vgId, - pWalHead->version, nodeVersion); - for (int32_t i = 0; i < pNode->replica; ++i) { - pPeer = pNode->peerInfo[i]; - syncRestartConnection(pPeer); + if (pWalHead->version > nodeVersion + 1) { + sError("vgId:%d, hver:%" PRIu64 ", inconsistent with ver:%" PRIu64, pNode->vgId, pWalHead->version, nodeVersion); + if (nodeRole == TAOS_SYNC_ROLE_SLAVE) { + sInfo("vgId:%d, restart connection", pNode->vgId); + for (int32_t i = 0; i < pNode->replica; ++i) { + pPeer = pNode->peerInfo[i]; + syncRestartConnection(pPeer); + } } + return TSDB_CODE_SYN_INVALID_VERSION; }