fix file corrupt
This commit is contained in:
parent
13d3657269
commit
0e6760702e
|
@ -557,6 +557,7 @@ int32_t tsdbReadBlockIdx(SDataFReader *pReader, SArray *aBlockIdx, uint8_t **ppB
|
||||||
}
|
}
|
||||||
|
|
||||||
// decode
|
// decode
|
||||||
|
n = 0;
|
||||||
n = tGetU32(*ppBuf + n, &delimiter);
|
n = tGetU32(*ppBuf + n, &delimiter);
|
||||||
ASSERT(delimiter == TSDB_FILE_DLMT);
|
ASSERT(delimiter == TSDB_FILE_DLMT);
|
||||||
|
|
||||||
|
@ -1285,6 +1286,7 @@ int32_t tsdbWriteBlockIdx(SDataFWriter *pWriter, SArray *aBlockIdx, uint8_t **pp
|
||||||
if (code) goto _err;
|
if (code) goto _err;
|
||||||
|
|
||||||
// build
|
// build
|
||||||
|
n = 0;
|
||||||
n = tPutU32(*ppBuf + n, TSDB_FILE_DLMT);
|
n = tPutU32(*ppBuf + n, TSDB_FILE_DLMT);
|
||||||
for (int32_t iBlockIdx = 0; iBlockIdx < taosArrayGetSize(aBlockIdx); iBlockIdx++) {
|
for (int32_t iBlockIdx = 0; iBlockIdx < taosArrayGetSize(aBlockIdx); iBlockIdx++) {
|
||||||
n += tPutBlockIdx(*ppBuf + n, taosArrayGet(aBlockIdx, iBlockIdx));
|
n += tPutBlockIdx(*ppBuf + n, taosArrayGet(aBlockIdx, iBlockIdx));
|
||||||
|
|
Loading…
Reference in New Issue