diff --git a/src/mnode/src/mnodeSdb.c b/src/mnode/src/mnodeSdb.c index bfa106fa75dc69f170ba4a0df8c5e528cdcab098..cc1af11a06a23a470a1337872b0ff943c49ba040 100644 --- a/src/mnode/src/mnodeSdb.c +++ b/src/mnode/src/mnodeSdb.c @@ -953,7 +953,7 @@ static int32_t sdbWriteToQueue(SSdbRow *pRow, int32_t qtype) { sdbIncRef(pRow->pTable, pRow->pObj); - sdbTrace("vgId:1, msg:%p write into to sdb queue", pRow->pMsg); + sdbTrace("vgId:1, msg:%p qtype:%s write into to sdb queue, queued:%d", pRow->pMsg, qtypeStr[qtype], queued); taosWriteQitem(tsSdbWQueue, qtype, pRow); return TSDB_CODE_MND_ACTION_IN_PROGRESS; @@ -961,7 +961,7 @@ static int32_t sdbWriteToQueue(SSdbRow *pRow, int32_t qtype) { static void sdbFreeFromQueue(SSdbRow *pRow) { int32_t queued = atomic_sub_fetch_32(&tsSdbMgmt.queuedMsg, 1); - sdbTrace("vgId:1, msg:%p free from sdb queue, queued:%d", pRow->pMsg, queued); + sdbTrace("vgId:1, msg:%p qtype:%s free from sdb queue, queued:%d", pRow->pMsg, qtypeStr[qtype], queued); sdbDecRef(pRow->pTable, pRow->pObj); taosFreeQitem(pRow); @@ -976,6 +976,9 @@ static int32_t sdbWriteWalToQueue(void *vparam, void *wparam, int32_t qtype, voi return TSDB_CODE_VND_OUT_OF_MEMORY; } + memcpy(pRow->pHead, pHead, sizeof(SWalHead) + pHead->len); + pRow->rowData = pRow->pHead->cont; + return sdbWriteToQueue(pRow, qtype); }