diff --git a/source/dnode/vnode/src/tsdb/tsdbCache.c b/source/dnode/vnode/src/tsdb/tsdbCache.c index 8fd0d479697..86d87de8cea 100644 --- a/source/dnode/vnode/src/tsdb/tsdbCache.c +++ b/source/dnode/vnode/src/tsdb/tsdbCache.c @@ -795,6 +795,9 @@ static int32_t reallocVarDataVal(SValue *pValue) { uint8_t *pVal = pValue->pData; uint32_t nData = pValue->nData; if (nData > 0) { + // [TODO] + tsdbInfo("reallocVarDataVal(): nData alloced %u", nData); + uint8_t *p = taosMemoryMalloc(nData); if (!p) { TAOS_RETURN(terrno); diff --git a/source/dnode/vnode/src/tsdb/tsdbCacheRead.c b/source/dnode/vnode/src/tsdb/tsdbCacheRead.c index f28e05c0cb7..a57e9a00fd6 100644 --- a/source/dnode/vnode/src/tsdb/tsdbCacheRead.c +++ b/source/dnode/vnode/src/tsdb/tsdbCacheRead.c @@ -164,8 +164,10 @@ static int32_t saveOneRow(SArray* pRow, SSDataBlock* pBlock, SCacheRowsReader* p int32_t pkBufLen = (pReader->rowKey.numOfPKs > 0) ? pReader->pkColumn.bytes : 0; uint32_t allocBufLen = pReader->pSchema->columns[slotId].bytes + pkBufLen; if (allocBufLen < pColVal->colVal.value.nData) { - tsdbError("buffer overflow at row key:%" PRIu64 ", data length %u exceeded the allocated buffer size %u", - ts, pColVal->colVal.value.nData, allocBufLen); + tsdbError("buffer overflow at row key:%" PRIu64 + ", data length %u exceeded the allocated buffer size %u" + ", pkBufLen = %d", + ts, pColVal->colVal.value.nData, allocBufLen, pkBufLen); code = TSDB_CODE_OUT_OF_RANGE; TSDB_CHECK_CODE(code, lino, _end); } diff --git a/source/dnode/vnode/src/tsdb/tsdbUtil.c b/source/dnode/vnode/src/tsdb/tsdbUtil.c index f807ecf2d6c..f8c020e2e7b 100644 --- a/source/dnode/vnode/src/tsdb/tsdbUtil.c +++ b/source/dnode/vnode/src/tsdb/tsdbUtil.c @@ -817,6 +817,11 @@ int32_t tsdbRowMergerAdd(SRowMerger *pMerger, TSDBROW *pRow, STSchema *pTSchema) code = tRealloc(&pTColVal->value.pData, pColVal->value.nData); if (code) return code; + // [TODO] + if (pTColVal->value.nData < pColVal->value.nData) { + tsdbInfo("tsdbRowMergedAdd(1): nData changed from %u to %u", pTColVal->value.nData, pColVal->value.nData); + } + pTColVal->value.nData = pColVal->value.nData; if (pTColVal->value.nData) { memcpy(pTColVal->value.pData, pColVal->value.pData, pTColVal->value.nData); @@ -837,6 +842,11 @@ int32_t tsdbRowMergerAdd(SRowMerger *pMerger, TSDBROW *pRow, STSchema *pTSchema) code = tRealloc(&tColVal->value.pData, pColVal->value.nData); if (code) return code; + // [TODO] + if (tColVal->value.nData < pColVal->value.nData) { + tsdbInfo("tsdbRowMergedAdd(-1): nData changed from %u to %u", tColVal->value.nData, pColVal->value.nData); + } + tColVal->value.nData = pColVal->value.nData; if (pColVal->value.nData) { memcpy(tColVal->value.pData, pColVal->value.pData, pColVal->value.nData);