From 046bee346a3a63d959d2b067548db8ccf3e2798c Mon Sep 17 00:00:00 2001 From: Jeff Tao Date: Tue, 19 May 2020 11:02:22 +0000 Subject: [PATCH 1/2] add more debug info --- src/rpc/src/rpcMain.c | 2 ++ src/vnode/src/vnodeMain.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/rpc/src/rpcMain.c b/src/rpc/src/rpcMain.c index 445e542387..dcbfbcf9ac 100644 --- a/src/rpc/src/rpcMain.c +++ b/src/rpc/src/rpcMain.c @@ -989,6 +989,7 @@ static void rpcSendQuickRsp(SRpcConn *pConn, int32_t code) { pHead->sourceId = pConn->ownId; pHead->destId = pConn->peerId; pHead->linkUid = pConn->linkUid; + pHead->ahandle = (uint64_t)pConn->ahandle; memcpy(pHead->user, pConn->user, tListLen(pHead->user)); pHead->code = htonl(code); @@ -1011,6 +1012,7 @@ static void rpcSendReqHead(SRpcConn *pConn) { pHead->sourceId = pConn->ownId; pHead->destId = pConn->peerId; pHead->linkUid = pConn->linkUid; + pHead->ahandle = (uint64_t)pConn->ahandle; memcpy(pHead->user, pConn->user, tListLen(pHead->user)); pHead->code = 1; diff --git a/src/vnode/src/vnodeMain.c b/src/vnode/src/vnodeMain.c index 6dabc98ae8..3f38fe2ad1 100644 --- a/src/vnode/src/vnodeMain.c +++ b/src/vnode/src/vnodeMain.c @@ -418,7 +418,7 @@ static int vnodeGetWalInfo(void *ahandle, char *name, uint32_t *index) { static void vnodeNotifyRole(void *ahandle, int8_t role) { SVnodeObj *pVnode = ahandle; - vPrint("vgId:%d, sync role changed from %d to %d", pVnode->vgId, pVnode->role, role); + vPrint("vgId:%d, sync role changed from %s to %s", pVnode->vgId, syncRole[pVnode->role], syncRole[role]); pVnode->role = role; if (pVnode->role == TAOS_SYNC_ROLE_MASTER) From 56686df2d066445c760e1360934167f3bad71793 Mon Sep 17 00:00:00 2001 From: Jeff Tao Date: Tue, 19 May 2020 12:40:12 +0000 Subject: [PATCH 2/2] syncRole is not defined in community edition --- src/vnode/src/vnodeMain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vnode/src/vnodeMain.c b/src/vnode/src/vnodeMain.c index 3f38fe2ad1..6dabc98ae8 100644 --- a/src/vnode/src/vnodeMain.c +++ b/src/vnode/src/vnodeMain.c @@ -418,7 +418,7 @@ static int vnodeGetWalInfo(void *ahandle, char *name, uint32_t *index) { static void vnodeNotifyRole(void *ahandle, int8_t role) { SVnodeObj *pVnode = ahandle; - vPrint("vgId:%d, sync role changed from %s to %s", pVnode->vgId, syncRole[pVnode->role], syncRole[role]); + vPrint("vgId:%d, sync role changed from %d to %d", pVnode->vgId, pVnode->role, role); pVnode->role = role; if (pVnode->role == TAOS_SYNC_ROLE_MASTER)