fix more bug
This commit is contained in:
parent
78985ce4f1
commit
4ac14697b7
|
@ -822,7 +822,7 @@ static int32_t tsdbMergeCommitLast(SCommitter *pCommitter, STbDataIter *pIter) {
|
||||||
// commit and reset block data schema if need
|
// commit and reset block data schema if need
|
||||||
// QUESTION: Is there a case that pBlockData->nRow == 0 but need to change schema ?
|
// QUESTION: Is there a case that pBlockData->nRow == 0 but need to change schema ?
|
||||||
if (pBlockData->suid || pBlockData->uid) {
|
if (pBlockData->suid || pBlockData->uid) {
|
||||||
if (pBlockData->suid != pTbData->uid || pBlockData->suid == 0) {
|
if (pBlockData->suid != pTbData->suid || pBlockData->suid == 0) {
|
||||||
if (pBlockData->nRow > 0) {
|
if (pBlockData->nRow > 0) {
|
||||||
code = tsdbCommitLastBlock(pCommitter);
|
code = tsdbCommitLastBlock(pCommitter);
|
||||||
if (code) goto _err;
|
if (code) goto _err;
|
||||||
|
|
|
@ -771,7 +771,7 @@ static int32_t tsdbReadBlockDataImpl(SDataFReader *pReader, SBlockInfo *pBlkInfo
|
||||||
if (code) goto _err;
|
if (code) goto _err;
|
||||||
p += hdr.szKey;
|
p += hdr.szKey;
|
||||||
|
|
||||||
ASSERT(p - pReader->pBuf1 == sizeof(TSCKSUM));
|
ASSERT(p - pReader->pBuf1 == pBlkInfo->szKey - sizeof(TSCKSUM));
|
||||||
|
|
||||||
// read and decode columns
|
// read and decode columns
|
||||||
if (taosArrayGetSize(pBlockData->aIdx) == 0) goto _exit;
|
if (taosArrayGetSize(pBlockData->aIdx) == 0) goto _exit;
|
||||||
|
@ -1195,7 +1195,7 @@ _err:
|
||||||
int32_t tsdbWriteBlockIdx(SDataFWriter *pWriter, SArray *aBlockIdx) {
|
int32_t tsdbWriteBlockIdx(SDataFWriter *pWriter, SArray *aBlockIdx) {
|
||||||
int32_t code = 0;
|
int32_t code = 0;
|
||||||
SHeadFile *pHeadFile = &pWriter->fHead;
|
SHeadFile *pHeadFile = &pWriter->fHead;
|
||||||
int64_t size;
|
int64_t size = 0;
|
||||||
int64_t n;
|
int64_t n;
|
||||||
|
|
||||||
// check
|
// check
|
||||||
|
|
Loading…
Reference in New Issue