“43b2f41fbbcbf7ee8c1620354dd7ff3441ac3caa”上不存在“tests/pytest/functions/function_first_restart.py”
提交 a59165fe 编写于 作者: A Alex Duan

[TS-238]<feature>: force updateLastRow even if lastRow is not null

上级 5a0ef683
...@@ -849,17 +849,16 @@ int tsdbRestoreLastRow(STsdbRepo *pRepo, STable *pTable, SReadH* pReadh, SBlockI ...@@ -849,17 +849,16 @@ int tsdbRestoreLastRow(STsdbRepo *pRepo, STable *pTable, SReadH* pReadh, SBlockI
pTable->lastKey = lastKey; pTable->lastKey = lastKey;
} else { } else {
// set // set
if (pTable->lastRow == NULL) { if (pTable->lastRow) {
pTable->lastKey = lastKey; SMemRow* p = pTable->lastRow;
pTable->lastRow = lastRow;
taosTZfree(p);
} else {
pTable->lastRow = lastRow; pTable->lastRow = lastRow;
lastRow = NULL;
} }
} }
TSDB_WUNLOCK_TABLE(pTable); TSDB_WUNLOCK_TABLE(pTable);
if (lastRow) {
taosTZfree(lastRow);
}
return 0; return 0;
} }
...@@ -1007,7 +1006,7 @@ int32_t tsdbLoadLastCache(STsdbRepo *pRepo, STable *pTable, bool lastKey) { ...@@ -1007,7 +1006,7 @@ int32_t tsdbLoadLastCache(STsdbRepo *pRepo, STable *pTable, bool lastKey) {
SBlockIdx *pIdx = readh.pBlkIdx; SBlockIdx *pIdx = readh.pBlkIdx;
if (pIdx && (cacheLastRowTableNum > 0) && (pTable->lastRow == NULL)) { if (pIdx && cacheLastRowTableNum > 0) {
if (tsdbRestoreLastRow(pRepo, pTable, &readh, pIdx, onlyKey) != 0) { if (tsdbRestoreLastRow(pRepo, pTable, &readh, pIdx, onlyKey) != 0) {
tsdbUnLockFS(REPO_FS(pRepo)); tsdbUnLockFS(REPO_FS(pRepo));
tsdbDestroyReadH(&readh); tsdbDestroyReadH(&readh);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册