diff --git a/source/dnode/vnode/src/tsdb/tsdbCommit.c b/source/dnode/vnode/src/tsdb/tsdbCommit.c index 2e6773e8e0dccd29f4237131b5b64641502ffee2..6f4dacdf4130a9168b95f31393563b2ef4c4b86b 100644 --- a/source/dnode/vnode/src/tsdb/tsdbCommit.c +++ b/source/dnode/vnode/src/tsdb/tsdbCommit.c @@ -476,7 +476,7 @@ static int32_t tsdbMergeTableData(SCommitter *pCommitter, STbDataIter *pIter, SB } _append_block_row: - code = tBlockDataAppendRow(pBlockData, pRow1, NULL); + code = tBlockDataAppendRow(pBlockData, pRow2, NULL); if (code) goto _err; if (pRow2->iRow + 1 < pBlockDataMerge->nRow) { diff --git a/source/dnode/vnode/src/tsdb/tsdbReaderWriter.c b/source/dnode/vnode/src/tsdb/tsdbReaderWriter.c index 3eb00f2eb32a408a50f9da5ed6ea8f26b50a279a..a8a5cb076e22b85ae9f8314b083fcf608ced5b9d 100644 --- a/source/dnode/vnode/src/tsdb/tsdbReaderWriter.c +++ b/source/dnode/vnode/src/tsdb/tsdbReaderWriter.c @@ -107,7 +107,7 @@ int32_t tsdbWriteDelData(SDelFWriter *pWriter, SArray *aDelData, uint8_t **ppBuf *(SBlockDataHdr *)(*ppBuf) = hdr; n += sizeof(hdr); for (int32_t iDelData = 0; iDelData < taosArrayGetSize(aDelData); iDelData++) { - size += tPutDelData(*ppBuf + n, taosArrayGet(aDelData, iDelData)); + n += tPutDelData(*ppBuf + n, taosArrayGet(aDelData, iDelData)); } taosCalcChecksumAppend(0, *ppBuf, size);