diff --git a/source/dnode/vnode/src/tsdb/tsdbMemTable.c b/source/dnode/vnode/src/tsdb/tsdbMemTable.c index 52c7a07c4943e41a89b3b2f8da6a418f15a150a5..fed02b9d998e87440446c5c56b1d36c8710a0993 100644 --- a/source/dnode/vnode/src/tsdb/tsdbMemTable.c +++ b/source/dnode/vnode/src/tsdb/tsdbMemTable.c @@ -568,7 +568,9 @@ static int32_t tsdbInsertTableDataImpl(SMemTable *pMemTable, STbData *pTbData, i do { key.ts = row.pTSRow->ts; nRow++; - tbDataMovePosTo(pTbData, pos, &key, SL_MOVE_FROM_POS); + if (SL_NODE_FORWARD(pos[0], 0) != pTbData->sl.pTail) { + tbDataMovePosTo(pTbData, pos, &key, SL_MOVE_FROM_POS); + } code = tbDataDoPut(pMemTable, pTbData, pos, &row, 1); if (code) { goto _err;