diff --git a/src/common/src/tdataformat.c b/src/common/src/tdataformat.c index c01141f0d68181713455ab2f58017ec6e112f8b4..77e91acc14f852f9e55d72f13532ea68a26078c5 100644 --- a/src/common/src/tdataformat.c +++ b/src/common/src/tdataformat.c @@ -201,10 +201,10 @@ void dataColInit(SDataCol *pDataCol, STColumn *pCol, void **pBuf, int maxPoints) pDataCol->len = 0; if (pDataCol->type == TSDB_DATA_TYPE_BINARY || pDataCol->type == TSDB_DATA_TYPE_NCHAR) { - pDataCol->spaceSize = (sizeof(VarDataLenT) + pDataCol->bytes) * maxPoints; pDataCol->dataOff = (VarDataOffsetT *)(*pBuf); - pDataCol->pData = POINTER_SHIFT(*pBuf, TYPE_BYTES[pDataCol->type] * maxPoints); - *pBuf = POINTER_SHIFT(*pBuf, pDataCol->spaceSize + TYPE_BYTES[pDataCol->type] * maxPoints); + pDataCol->pData = POINTER_SHIFT(*pBuf, sizeof(VarDataOffsetT) * maxPoints); + pDataCol->spaceSize = pDataCol->bytes * maxPoints; + *pBuf = POINTER_SHIFT(*pBuf, pDataCol->spaceSize + sizeof(VarDataOffsetT) * maxPoints); } else { pDataCol->spaceSize = pDataCol->bytes * maxPoints; pDataCol->dataOff = NULL; diff --git a/src/tsdb/src/tsdbMetaFile.c b/src/tsdb/src/tsdbMetaFile.c index 19fcae94e367816d01aa3cb29dd2f05890c3769d..921db8674aff5dd4463c122e277adb76d09fe9b1 100644 --- a/src/tsdb/src/tsdbMetaFile.c +++ b/src/tsdb/src/tsdbMetaFile.c @@ -105,7 +105,7 @@ int32_t tsdbInsertMetaRecord(SMetaFile *mfh, uint64_t uid, void *cont, int32_t c return -1; } - fsync(mfh->fd); + // fsync(mfh->fd); mfh->tombSize++; @@ -132,7 +132,7 @@ int32_t tsdbDeleteMetaRecord(SMetaFile *mfh, uint64_t uid) { return -1; } - fsync(mfh->fd); + // fsync(mfh->fd); mfh->nDel++; @@ -167,7 +167,7 @@ int32_t tsdbUpdateMetaRecord(SMetaFile *mfh, uint64_t uid, void *cont, int32_t c return -1; } - fsync(mfh->fd); + // fsync(mfh->fd); return 0; }