提交 17c0b955 编写于 作者: A Alex Duan

[TS-238]<feature>(tsdb): fixed super table last_row bug

上级 2d50a39b
......@@ -618,6 +618,13 @@ static int tsdbModifyBlocks(SDeleteH *pdh, STableDeleteH *pItem) {
STSchema *pSchema = NULL;
SBlockIdx blkIdx = {0};
// update last row if need
TSKEY lastKey = pItem->pTable->lastKey;
if(lastKey >= pdh->pCtlInfo->win.skey && lastKey <= pdh->pCtlInfo->win.ekey) {
// update lastkey and lastrow
tsdbAddUpdates(pdh->aUpdates, pItem->pTable);
}
// get pSchema for del table
if ((pSchema = tsdbGetTableSchemaImpl(pItem->pTable, true, true, -1, -1)) == NULL) {
return -1;
......@@ -684,12 +691,6 @@ static int tsdbModifyBlocks(SDeleteH *pdh, STableDeleteH *pItem) {
}
// update new last row in last row was deleted
TSKEY lastKey = pItem->pTable->lastKey;
if(lastKey >= pdh->pCtlInfo->win.skey && lastKey <= pdh->pCtlInfo->win.ekey) {
// update lastkey and lastrow
tsdbAddUpdates(pdh->aUpdates, pItem->pTable);
}
if (affectedRows > 0) {
// affectedRows
if (pdh->pCtlInfo->pRsp) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册