TD-353
This commit is contained in:
parent
f3e633d910
commit
fe34e6a274
|
@ -300,8 +300,8 @@ int tsdbUpdateFileHeader(SFile *pFile, uint32_t version) {
|
|||
char buf[TSDB_FILE_HEAD_SIZE] = "\0";
|
||||
|
||||
void *pBuf = (void *)buf;
|
||||
taosEncodeFixedU32(pBuf, version);
|
||||
tsdbEncodeSFileInfo(pBuf, &(pFile->info));
|
||||
taosEncodeFixedU32((void *)(&pBuf), version);
|
||||
tsdbEncodeSFileInfo((void *)(&pBuf), &(pFile->info));
|
||||
|
||||
taosCalcChecksumAppend(0, (uint8_t *)buf, TSDB_FILE_HEAD_SIZE);
|
||||
|
||||
|
|
|
@ -161,7 +161,7 @@ int tsdbTakeMemSnapshot(STsdbRepo *pRepo, SMemTable **pMem, SMemTable **pIMem) {
|
|||
if (tsdbLockRepo(pRepo) < 0) return -1;
|
||||
|
||||
*pMem = pRepo->mem;
|
||||
*pIMem = pRepo->mem;
|
||||
*pIMem = pRepo->imem;
|
||||
tsdbRefMemTable(pRepo, *pMem);
|
||||
tsdbRefMemTable(pRepo, *pIMem);
|
||||
|
||||
|
|
|
@ -241,9 +241,9 @@ int tdUpdateKVStoreRecord(SKVStore *pStore, uint64_t uid, void *cont, int contLe
|
|||
pStore->info.size += (sizeof(SKVRecord) + contLen);
|
||||
SKVRecord *pRecord = taosHashGet(pStore->map, (void *)&uid, sizeof(uid));
|
||||
if (pRecord != NULL) { // just to insert
|
||||
pStore->info.nRecords++;
|
||||
} else {
|
||||
pStore->info.tombSize += pRecord->size;
|
||||
} else {
|
||||
pStore->info.nRecords++;
|
||||
}
|
||||
|
||||
taosHashPut(pStore->map, (void *)(&uid), sizeof(uid), (void *)(&rInfo), sizeof(rInfo));
|
||||
|
|
Loading…
Reference in New Issue