提交 55840709 编写于 作者: H Hongze Cheng

skip dropped table tomb data commit

上级 ee5e3b7c
...@@ -112,6 +112,8 @@ static int32_t tsdbCommitTSData(SCommitter2 *committer) { ...@@ -112,6 +112,8 @@ static int32_t tsdbCommitTSData(SCommitter2 *committer) {
committer->ctx->hasTSData = false; committer->ctx->hasTSData = false;
committer->ctx->tbid->suid = 0;
committer->ctx->tbid->uid = 0;
for (SRowInfo *row; (row = tsdbIterMergerGetData(committer->dataIterMerger)) != NULL;) { for (SRowInfo *row; (row = tsdbIterMergerGetData(committer->dataIterMerger)) != NULL;) {
if (row->uid != committer->ctx->tbid->uid) { if (row->uid != committer->ctx->tbid->uid) {
committer->ctx->tbid->suid = row->suid; committer->ctx->tbid->suid = row->suid;
...@@ -151,12 +153,26 @@ _exit: ...@@ -151,12 +153,26 @@ _exit:
static int32_t tsdbCommitTombData(SCommitter2 *committer) { static int32_t tsdbCommitTombData(SCommitter2 *committer) {
int32_t code = 0; int32_t code = 0;
int32_t lino = 0; int32_t lino = 0;
SMetaInfo info;
if (committer->ctx->fset == NULL && !committer->ctx->hasTSData) { if (committer->ctx->fset == NULL && !committer->ctx->hasTSData) {
return 0; return 0;
} }
committer->ctx->tbid->suid = 0;
committer->ctx->tbid->uid = 0;
for (STombRecord *record; (record = tsdbIterMergerGetTombRecord(committer->tombIterMerger));) { for (STombRecord *record; (record = tsdbIterMergerGetTombRecord(committer->tombIterMerger));) {
if (record->uid != committer->ctx->tbid->uid) {
committer->ctx->tbid->suid = record->suid;
committer->ctx->tbid->uid = record->uid;
if (metaGetInfo(committer->tsdb->pVnode->pMeta, record->uid, &info, NULL) != 0) {
code = tsdbIterMergerSkipTableData(committer->dataIterMerger, committer->ctx->tbid);
TSDB_CHECK_CODE(code, lino, _exit);
continue;
}
}
if (record->ekey < committer->ctx->minKey) { if (record->ekey < committer->ctx->minKey) {
goto _next; goto _next;
} else if (record->skey > committer->ctx->maxKey) { } else if (record->skey > committer->ctx->maxKey) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册