From d06ff2344aa3b49caff0be63d5960c48dc28f52d Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Wed, 6 Jan 2021 09:53:52 +0800 Subject: [PATCH] TD-2640 --- src/sync/src/syncRetrieve.c | 7 ++++--- src/vnode/src/vnodeWrite.c | 5 ++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/sync/src/syncRetrieve.c b/src/sync/src/syncRetrieve.c index 097e4c8e81..153886102e 100644 --- a/src/sync/src/syncRetrieve.c +++ b/src/sync/src/syncRetrieve.c @@ -143,10 +143,10 @@ static int32_t syncRetrieveFile(SSyncPeer *pPeer) { // if sync is not required, continue if (fileAck.sync == 0) { fileInfo.index++; - sDebug("%s, %s is the same", pPeer->id, fileInfo.name); + sDebug("%s, %s is the same, fver:%" PRIu64, pPeer->id, fileInfo.name, fileInfo.fversion); continue; } else { - sDebug("%s, %s will be sent", pPeer->id, fileInfo.name); + sDebug("%s, %s will be sent, fver:%" PRIu64, pPeer->id, fileInfo.name, fileInfo.fversion); } // get the full path to file @@ -328,7 +328,8 @@ static int32_t syncProcessLastWal(SSyncPeer *pPeer, char *wname, int64_t index) // if bytes > 0, file is updated, or fversion is not reached but file still open, read again once = 1; offset += bytes; - sDebug("%s, continue retrieve last wal, bytes:%d offset:%" PRId64, pPeer->id, bytes, offset); + sDebug("%s, continue retrieve last wal, bytes:%d offset:%" PRId64 " sver:%" PRIu64 " fver:%" PRIu64, pPeer->id, + bytes, offset, pPeer->sversion, fversion); } return -1; diff --git a/src/vnode/src/vnodeWrite.c b/src/vnode/src/vnodeWrite.c index b65251508d..cd05248877 100644 --- a/src/vnode/src/vnodeWrite.c +++ b/src/vnode/src/vnodeWrite.c @@ -90,7 +90,10 @@ int32_t vnodeProcessWrite(void *vparam, void *wparam, int32_t qtype, void *rpara // write into WAL code = walWrite(pVnode->wal, pHead); - if (code < 0) return code; + if (code < 0) { + vError("vgId:%d, hver:%" PRIu64 " vver:%" PRIu64 " code:0x%x", pVnode->vgId, pHead->version, pVnode->version, code); + return code; + } pVnode->version = pHead->version; -- GitLab