This commit is contained in:
Hongze Cheng 2020-06-18 10:53:54 +00:00
parent f3e633d910
commit fe34e6a274
3 changed files with 5 additions and 5 deletions

View File

@ -300,8 +300,8 @@ int tsdbUpdateFileHeader(SFile *pFile, uint32_t version) {
char buf[TSDB_FILE_HEAD_SIZE] = "\0"; char buf[TSDB_FILE_HEAD_SIZE] = "\0";
void *pBuf = (void *)buf; void *pBuf = (void *)buf;
taosEncodeFixedU32(pBuf, version); taosEncodeFixedU32((void *)(&pBuf), version);
tsdbEncodeSFileInfo(pBuf, &(pFile->info)); tsdbEncodeSFileInfo((void *)(&pBuf), &(pFile->info));
taosCalcChecksumAppend(0, (uint8_t *)buf, TSDB_FILE_HEAD_SIZE); taosCalcChecksumAppend(0, (uint8_t *)buf, TSDB_FILE_HEAD_SIZE);

View File

@ -161,7 +161,7 @@ int tsdbTakeMemSnapshot(STsdbRepo *pRepo, SMemTable **pMem, SMemTable **pIMem) {
if (tsdbLockRepo(pRepo) < 0) return -1; if (tsdbLockRepo(pRepo) < 0) return -1;
*pMem = pRepo->mem; *pMem = pRepo->mem;
*pIMem = pRepo->mem; *pIMem = pRepo->imem;
tsdbRefMemTable(pRepo, *pMem); tsdbRefMemTable(pRepo, *pMem);
tsdbRefMemTable(pRepo, *pIMem); tsdbRefMemTable(pRepo, *pIMem);

View File

@ -241,9 +241,9 @@ int tdUpdateKVStoreRecord(SKVStore *pStore, uint64_t uid, void *cont, int contLe
pStore->info.size += (sizeof(SKVRecord) + contLen); pStore->info.size += (sizeof(SKVRecord) + contLen);
SKVRecord *pRecord = taosHashGet(pStore->map, (void *)&uid, sizeof(uid)); SKVRecord *pRecord = taosHashGet(pStore->map, (void *)&uid, sizeof(uid));
if (pRecord != NULL) { // just to insert if (pRecord != NULL) { // just to insert
pStore->info.nRecords++;
} else {
pStore->info.tombSize += pRecord->size; pStore->info.tombSize += pRecord->size;
} else {
pStore->info.nRecords++;
} }
taosHashPut(pStore->map, (void *)(&uid), sizeof(uid), (void *)(&rInfo), sizeof(rInfo)); taosHashPut(pStore->map, (void *)(&uid), sizeof(uid), (void *)(&rInfo), sizeof(rInfo));