From 528521075ad5b2fb8b4847990bbe741c4da5fd0e Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Tue, 8 Sep 2020 14:27:40 +0000 Subject: [PATCH 1/3] TD-1377 TD-1258 TD-1286 update logs --- src/mnode/src/mnodeDnode.c | 1 + src/mnode/src/mnodeMnode.c | 1 + src/vnode/src/vnodeMain.c | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/src/mnode/src/mnodeDnode.c b/src/mnode/src/mnodeDnode.c index aaad2462ea..ac8730b0cc 100644 --- a/src/mnode/src/mnodeDnode.c +++ b/src/mnode/src/mnodeDnode.c @@ -72,6 +72,7 @@ static int32_t mnodeDnodeActionInsert(SSdbOper *pOper) { pDnode->lastAccess = tsAccessSquence; } + mInfo("dnode:%d, fqdn:%s ep:%s port:%d, do insert action", pDnode->dnodeId, pDnode->dnodeFqdn, pDnode->dnodeEp, pDnode->dnodePort); return TSDB_CODE_SUCCESS; } diff --git a/src/mnode/src/mnodeMnode.c b/src/mnode/src/mnodeMnode.c index c762403525..bff84d8041 100644 --- a/src/mnode/src/mnodeMnode.c +++ b/src/mnode/src/mnodeMnode.c @@ -68,6 +68,7 @@ static int32_t mnodeMnodeActionInsert(SSdbOper *pOper) { pDnode->isMgmt = true; mnodeDecDnodeRef(pDnode); + mInfo("mnode:%d, fqdn:%s ep:%s port:%d, do insert action", pMnode->mnodeId, pDnode->dnodeFqdn, pDnode->dnodeEp, pDnode->dnodePort); return TSDB_CODE_SUCCESS; } diff --git a/src/vnode/src/vnodeMain.c b/src/vnode/src/vnodeMain.c index a463a2c90a..4a2d9859b9 100644 --- a/src/vnode/src/vnodeMain.c +++ b/src/vnode/src/vnodeMain.c @@ -677,9 +677,13 @@ static int32_t vnodeSaveCfg(SMDCreateVnodeMsg *pVnodeCfg) { len += snprintf(content + len, maxLen - len, " \"quorum\": %d,\n", pVnodeCfg->cfg.quorum); len += snprintf(content + len, maxLen - len, " \"nodeInfos\": [{\n"); + + vInfo("vgId:%d, save vnode cfg, replica:%d", pVnodeCfg->cfg.vgId, pVnodeCfg->cfg.replications); for (int32_t i = 0; i < pVnodeCfg->cfg.replications; i++) { len += snprintf(content + len, maxLen - len, " \"nodeId\": %d,\n", pVnodeCfg->nodes[i].nodeId); len += snprintf(content + len, maxLen - len, " \"nodeEp\": \"%s\"\n", pVnodeCfg->nodes[i].nodeEp); + vInfo("vgId:%d, save vnode cfg, nodeId:%d nodeEp:%s", pVnodeCfg->cfg.vgId, pVnodeCfg->nodes[i].nodeId, + pVnodeCfg->nodes[i].nodeEp); if (i < pVnodeCfg->cfg.replications - 1) { len += snprintf(content + len, maxLen - len, " },{\n"); From add82236f6b883f026277801e33d274aff8362f4 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Wed, 9 Sep 2020 11:10:58 +0000 Subject: [PATCH 2/3] TD-1397 --- src/mnode/src/mnodeSdb.c | 8 ++++---- tests/script/unique/account/paras.sim | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mnode/src/mnodeSdb.c b/src/mnode/src/mnodeSdb.c index e3ed7daf8c..d2c16a27b0 100644 --- a/src/mnode/src/mnodeSdb.c +++ b/src/mnode/src/mnodeSdb.c @@ -612,8 +612,8 @@ static int sdbWrite(void *param, void *data, int type) { } else if (action == SDB_ACTION_DELETE) { void *pRow = sdbGetRowMeta(pTable, pHead->cont); if (pRow == NULL) { - sdbError("table:%s, failed to get object:%s from wal while dispose delete action", pTable->tableName, - pHead->cont); + sdbDebug("table:%s, object:%s not exist in hash, ignore delete action", pTable->tableName, + sdbGetKeyStr(pTable, pHead->cont)); return TSDB_CODE_SUCCESS; } SSdbOper oper = {.table = pTable, .pObj = pRow}; @@ -621,8 +621,8 @@ static int sdbWrite(void *param, void *data, int type) { } else if (action == SDB_ACTION_UPDATE) { void *pRow = sdbGetRowMeta(pTable, pHead->cont); if (pRow == NULL) { - sdbError("table:%s, failed to get object:%s from wal while dispose update action", pTable->tableName, - pHead->cont); + sdbError("table:%s, object:%s not exist in hash, ignore update action", pTable->tableName, + sdbGetKeyStr(pTable, pHead->cont)); return TSDB_CODE_SUCCESS; } SSdbOper oper = {.rowSize = pHead->len, .rowData = pHead->cont, .table = pTable}; diff --git a/tests/script/unique/account/paras.sim b/tests/script/unique/account/paras.sim index 60c08b21e9..ae511fe2b0 100644 --- a/tests/script/unique/account/paras.sim +++ b/tests/script/unique/account/paras.sim @@ -14,10 +14,10 @@ print $data00 $data01 $data02 $data03 $data04 $data05 $data06 if $data00 != root then return -1 endi -if $data02 != 3/10 then +if $data02 != 3/128 then return -1 endi -if $data03 != 0/64 then +if $data03 != 0/128 then return -1 endi if $data04 != 0/2147483647 then From 888e0f2a91bd49b9611a0c065a16716ede55cf63 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Wed, 9 Sep 2020 11:15:18 +0000 Subject: [PATCH 3/3] minor changes --- src/mnode/src/mnodeSdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mnode/src/mnodeSdb.c b/src/mnode/src/mnodeSdb.c index d2c16a27b0..8928a6622d 100644 --- a/src/mnode/src/mnodeSdb.c +++ b/src/mnode/src/mnodeSdb.c @@ -621,7 +621,7 @@ static int sdbWrite(void *param, void *data, int type) { } else if (action == SDB_ACTION_UPDATE) { void *pRow = sdbGetRowMeta(pTable, pHead->cont); if (pRow == NULL) { - sdbError("table:%s, object:%s not exist in hash, ignore update action", pTable->tableName, + sdbDebug("table:%s, object:%s not exist in hash, ignore update action", pTable->tableName, sdbGetKeyStr(pTable, pHead->cont)); return TSDB_CODE_SUCCESS; }